Jump to content

Newbie question: WinWait... doesn't work

Recommended Posts


I have a problem with the WinWait, WinWaitActive and WinWaitClose functions.

When I use them in a Script to look if a window exists(, is active or is closed) it pauses, even if the Window is there(,active or is closed). When I use these functions with a max. time setting the Script waits the whole time an then goes on. My Script looks like this:

Global $primary
    Global $secondary
    Global $WindowTitle1 = IsString("Winamp - Setup")
    Global $WindowTitle2 = IsString("Winamp: User information")

     Opt("MouseCoordMode", 0);; Mouse coordinates relative to active window

     MsgBox(0, "WinAmp 5.04 full - InstallScript - AutoIt v3", "...")

Func StartFunc()

     AutoItSetOption("WinTitleMatchMode", 3)
    WinWait($WindowTitle1, "", 5) 
    WinWaitClose($WindowTitle1), "", 60)



I also tried to use function to ensure that a window is active, from this forum, but it did not work either:

Func EnsureActive($szTitle)
    While Not WinActive($szTitle)

Maybe someone knows what the problem is and how I can solve it - maybe I missed something vital or I have to use another option. Thanks in advance :ph34r:

Link to post
Share on other sites

quickly I notice this is wrong...

Global $WindowTitle1 = IsString("Winamp - Setup")
    Global $WindowTitle2 = IsString("Winamp: User information")

see what IsString does


Thanks for your help, I didn't look at the var declaration for errors :ph34r:
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...