seres Posted September 9, 2007 Posted September 9, 2007 hello, how do i change the value of a boolean to true if a window is not active, here is my code Global $Run = True HotKeySet("^+!s", "new") Func new() If $Run = True Then run("new") $Run = False Else winclose ("new") $Run = True endif EndFunc sometimes i close the window with alt+f4, but the $Run doesnt change to true automatically so i have to press the func again what do i have to add to make it change to true if it closes by another thing different than ^+!s
Generator Posted September 9, 2007 Posted September 9, 2007 Probably..... If WinExists("new") Then WinClose("new") Else Run("new") EndIf
seres Posted September 9, 2007 Author Posted September 9, 2007 i mean that when it runs the new $run becomes false so when i press the same keys it closes and becoms true but sometime i close it with alt+f4 and the $run doesnt change to true is there a form to change this value if i press alt+f4 accydentaly
Nahuel Posted September 9, 2007 Posted September 9, 2007 I don't really understand you but... If WinGetState("New")=8 Then $Run=Not $Run EndIf It changes the state of $Run to True if it's False or to False if it's True when the "New" window is active.
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