topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 4:07 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: IDEA (silly help really)  (Read 5399 times)

Uncle Larry

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 8
    • View Profile
    • Donate to Member
DONE: IDEA (silly help really)
« on: February 08, 2011, 03: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,832
    • View Profile
    • Donate to Member
Re: IDEA (silly help really)
« Reply #1 on: February 08, 2011, 04: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
#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

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 8
    • View Profile
    • Donate to Member
Re: IDEA (silly help really)
« Reply #2 on: February 09, 2011, 08:12 AM »
 :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,832
    • View Profile
    • Donate to Member
Re: IDEA (silly help really)
« Reply #3 on: February 09, 2011, 05:37 PM »
you're most welcome!