Guest tygran Posted September 21, 2004 Posted September 21, 2004 Hello, 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", "...") StartFunc() Func StartFunc() AutoItSetOption("WinTitleMatchMode", 3) MouseButtonCheck() Run("winamp504_full.exe") WinWait($WindowTitle1, "", 5) WinActivate($WindowTitle1) WindowOne() WinWaitClose($WindowTitle1), "", 60) WinActivate($WindowTitle2) WindowTwo() [...] EndFunc 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) WinWait($szTitle,"",5) While Not WinActive($szTitle) WinActivate($szTitle) Sleep(100) Wend WinWaitActive($szTitle,"",5) EndFunc 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
Guest tygran Posted September 22, 2004 Posted September 22, 2004 quickly I notice this is wrong... Global $WindowTitle1 = IsString("Winamp - Setup") Global $WindowTitle2 = IsString("Winamp: User information") see what IsString does <{POST_SNAPBACK}>Thanks for your help, I didn't look at the var declaration for errors
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now