Falling Posted November 4, 2004 Share Posted November 4, 2004 Like : I click a button. Then.. If WindowA appears then... elseif WindowB appears then... ----------------- I have tried a few things. Like if (winwait (...)) Did not seem to work Link to comment Share on other sites More sharing options...
Josbe Posted November 4, 2004 Share Posted November 4, 2004 (edited) Please, post your code. Edit:BTW: A related topic... Edited November 4, 2004 by josbe AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Falling Posted November 4, 2004 Author Share Posted November 4, 2004 $wait= WinWait("title","", 5); 5 secs. If $wait=1 Then... This is what i was trying to do. Just seems so weird not having it in a function. This is how i'd assume I'd check two windows. Func WhichWindow($name1, $name2); $window1 = WinWait($name1,"", 5); 5 secs. $window2 = WinWait($name2,"", 5); 5 secs. If $window1 == $window2 Then Return 0; None are true. EndIf If $window1 = 1 Return 1; $name1 is true Else Return 2; $name2 is true EndIf EndFunc ; example -> $whatnext = WhichWindow("Bank1menu", "Bank2menu") ; then u can use a switch case on what is next... etc. Link to comment Share on other sites More sharing options...
Falling Posted November 4, 2004 Author Share Posted November 4, 2004 hah..or i guess i could just use WinExists ( "title" [, "text"] ) ....... darn u help file. Link to comment Share on other sites More sharing options...
w_sp8er Posted November 5, 2004 Share Posted November 5, 2004 (edited) This is what I do While 1 If WinActive("Title", "Text") Then Do Something ExitLoop ElseIf WinActive("Title2","Text2") Then Do Something Else ExitLoop EndIf Sleep(250) Wend or While 1 If WinActive("Title", "Text") Then Do Something ExitLoop EndIf If WinActive("Title2","Text2") Then Do Something Else ExitLoop EndIf Sleep(250) Wend Edited November 5, 2004 by w_sp8er Link to comment Share on other sites More sharing options...
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