JuggaloZeke Posted November 23, 2004 Share Posted November 23, 2004 (edited) The Problem: Sometimes the sript I wrote can run astray. I'm trying to solve this by making it check to see if it is at the correct place before it executes again. [it's in a while statement.]Ok... I want an If Then statement that functions like this:If [window is not active] Then Do this Else Do this EndIfbut I can't figure out how to make that first expression... an expression. Edited November 23, 2004 by JuggaloZeke Link to comment Share on other sites More sharing options...
JuggaloZeke Posted November 23, 2004 Author Share Posted November 23, 2004 Even something like If [WinWaitActive exp[b][/b]ression] Then Do This Else Do This EndIf Would work but I don't know how to get the WinWaitActive to work with If. Link to comment Share on other sites More sharing options...
SumTingWong Posted November 24, 2004 Share Posted November 24, 2004 (edited) Even something like If [WinWaitActive exp[b][/b]ression] Then Do This Else Do This EndIfWould work but I don't know how to get the WinWaitActive to work with If.<{POST_SNAPBACK}>WinWaitActive returns 1 for success and 0 for failureTherefore:If WinWaitActive(....) = 1 Then ; do something with active window Else ; window not found EndIfCheck help file for more info on WinWaitActive. Edited November 24, 2004 by pacman Link to comment Share on other sites More sharing options...
SlimShady Posted November 24, 2004 Share Posted November 24, 2004 If NOT WinActive("Title", "optional text. you can leave this out") Then ;Do this Else ;Do this EndIf Link to comment Share on other sites More sharing options...
JuggaloZeke Posted November 24, 2004 Author Share Posted November 24, 2004 Thanks pacman, I totally forgot that returned a value like that. 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