SweatyOgre Posted May 27, 2004 Posted May 27, 2004 I would like to have my script start a program if it isnt already, but otherwise just continue. This is part of a function, so i cant just put the WinExists in an If statement and the rest of the script in an Else. Here's my code: Func StartAim() Run($Path) WinWait($Aim, "", 20) EndFunc Is there a way to just tell it to only perform this operation if the window doesnt exist? Such as Func StartAim() If WinExists($Aim) = 0 then Run($Path) WinWait($Aim, "", 20) EndFunc
brett Posted May 27, 2004 Posted May 27, 2004 Maybe like this? Func StartAim() If WinExists($Aim) then ;Do nothing Else Run($Path) WinWait($Aim, "", 20) Endif EndFunc -Brett
SweatyOgre Posted May 27, 2004 Author Posted May 27, 2004 (edited) So a line with nothing on it will make the script do nothing? EDIT:To clarify, I mean a line following an If and preceding an Else. Edited May 27, 2004 by SweatyOgre
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