mwpeck Posted December 28, 2008 Posted December 28, 2008 (edited) Basically I have a standard pause function:Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) WEnd EndFuncHow I can negate that loop so I can check if its NOT paused? I have tried:Func TogglePause() $Paused = NOT $Paused While <> $Paused sleep(100) WEnd EndFuncBut it doesnt work just says "==> Error in expression.:" Edited December 28, 2008 by mwpeck
Pain Posted December 28, 2008 Posted December 28, 2008 Look at upper left corner. Global $Paused HotKeySet("{PAUSE}", "TogglePause") While 1 Sleep(100) ToolTip('Script is NOT "Paused"',0,0) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"',0,0) WEnd EndFunc
mwpeck Posted December 28, 2008 Author Posted December 28, 2008 (edited) Look at upper left corner.What do you mean? I already have the variable set as a global variable....basically what I'm trying to do, is use it in another function. The other function is basically an infinite loop on its own, I want to be able to exit the function when I push the pause button. Therefore I want it to loop WHILE its NOT paused.EDIT:Hmmm, nevermind, it seems:While NOT $Paused sleep(100)WEndworked...guess you have to use NOT in place of <> for booleans or something. Edited December 28, 2008 by mwpeck
Xand3r Posted December 29, 2008 Posted December 29, 2008 (edited) What do you mean? I already have the variable set as a global variable....basically what I'm trying to do, is use it in another function. The other function is basically an infinite loop on its own, I want to be able to exit the function when I push the pause button. Therefore I want it to loop WHILE its NOT paused. EDIT: Hmmm, nevermind, it seems: worked...guess you have to use NOT in place of <> for booleans or something. <> is for comparison so when you use this you shoud compare the var with something like while $var<>true;($var=false) while $var;($var=true) while not $var;($var=false) while not $var=false;($var=true) etc ... etc... Edited December 29, 2008 by TheMadman Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro
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