seres Posted September 9, 2007 Share Posted September 9, 2007 hi, im having trouble with the pause/break (ctrl+pause/break) is there any form to yust pause the program but not terminate it with hotkey combination Link to comment Share on other sites More sharing options...
Paulie Posted September 9, 2007 Share Posted September 9, 2007 Have you seen the example in the HotKeySet Helpfile page? Check out the "TogglePause" function. Link to comment Share on other sites More sharing options...
seres Posted September 9, 2007 Author Share Posted September 9, 2007 (edited) thanks it worked is $pause a function or something, whats the difference between this $pause and what ever u declare like $whatever Edited September 9, 2007 by seres Link to comment Share on other sites More sharing options...
Paulie Posted September 9, 2007 Share Posted September 9, 2007 (edited) You can change the code.... Don't like the tooltip? take it out? HotKeySet("{PAUSE}", "TogglePause") Global $Paused;Default is unpaused (0=off 1=on) While 1 ;Your script goes here Tooltip("Script is running");only for demonstrations sake WEnd Func TogglePause() $Paused = NOT $Paused ;changes $Paused from 0 to 1 or from 1 to 0 While $Paused ; while $Paused = 1 sleep(100) ; idle around (pause) WEnd EndFunc Edited September 9, 2007 by Paulie Link to comment Share on other sites More sharing options...
Paulie Posted September 9, 2007 Share Posted September 9, 2007 thanks it worked is $pause a function or something, whats the difference between this $pause and what ever u declare like $whatever There is no difference. Look at the example again, you will notice it is declared in the first line: Global $Paused Link to comment Share on other sites More sharing options...
seres Posted September 9, 2007 Author Share Posted September 9, 2007 (edited) yea but is global $pause is really pausing the script cause i use things like global $opennn then i call it in the functions and it yust do what i put in the code, so why $pause pauses the script with out having to put code when calling it in the functions Edited September 9, 2007 by seres 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