ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: IDEA (silly help really)

(1/1)

Uncle Larry:
Guys this is so lame I'm embarrassed to even ask.  I'm using autohotkey to write a stay-resident macro to kill a #$%#$(# message box our app developers put into an IE based application we all use every day.  It is a notice box that pops up on nearly every file we work on, and we have to click it "ok" to make it go away before proceeding.

What I've written works ... once.  I cannot get the stupid thing to loop and twiddle its thumbs until the next instance pops up.  Here is what I have:

#Persistent
WinWait, Windows Internet Explorer, There are APP data/U
IfWinNotActive, Windows Internet Explorer, There are APP data/U, WinActivate, Windows Internet Explorer, There are APP data/U
WinWaitActive, Windows Internet Explorer, There are APP data/U
Send {Enter}
Sleep, 100

The actual error box says "There are APP data/info related errors, Click the App Data Error tab to get full details" but by using macro recorder I wrote the above and it works.  I suppose I need to put this into some kind of while ... loop or something, but I'm just too tired at night when I get to play with this stuff to think it through.

A little help?  Please?

Target:
the issue appears to be that you have no loop, ie the code runs through to the end but there's nothing to direct it back to the beginning

try this instead - it's untested, but it should work

--- ---#Persistent

Loop
{
    ifwinexist, Windows Internet Explorer, There are APP data/U
    {
        WinActivate, Windows Internet Explorer, There are APP data/U
        Send {Enter}
    }
    Sleep, 100
}

Uncle Larry:
 :Thmbsup:  Thanks - it worked!  I used to do some fairly elaborate VB scripts in the past, but apparently if you don't use it, you lose it. 

Target:
you're most welcome!

Navigation

[0] Message Index

Go to full version