DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: DONE: IDEA (silly help really)  (Read 6,871 times)

Uncle Larry

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 8
DONE: IDEA (silly help really)
« on: February 08, 2011, 09:43 PM »
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

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,840
    • Coding Snacks
Re: IDEA (silly help really)
« Reply #1 on: February 08, 2011, 10:51 PM »
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
Code
#Persistent

Loop
{
    ifwinexist, Windows Internet Explorer, There are APP data/U
    {
        WinActivate, Windows Internet Explorer, There are APP data/U
        Send {Enter}
    }
    Sleep, 100
}
Alcohol is photoshop, bottled
Askhole - someone who ask for advice, then ignores it
"Look wise, say nothing, and grunt. Speech was given to conceal thought" - Sir William Osler

Uncle Larry

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 8
Re: IDEA (silly help really)
« Reply #2 on: February 09, 2011, 02:12 PM »
: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

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,840
    • Coding Snacks
Re: IDEA (silly help really)
« Reply #3 on: February 09, 2011, 11:37 PM »
you're most welcome!
Alcohol is photoshop, bottled
Askhole - someone who ask for advice, then ignores it
"Look wise, say nothing, and grunt. Speech was given to conceal thought" - Sir William Osler

Original address: https://www.donationcoder.com/forum/index.php?topic=25567.0