Sign in to follow this  
Followers 0
seres

help with pause

6 posts in this topic

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

Share this post


Link to post
Share on other sites



Have you seen the example in the HotKeySet Helpfile page?

Check out the "TogglePause" function.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

thanks it worked

is $pause a function or something, whats the difference between this $pause and what ever u declare like $whatever

Edited by seres

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by Paulie

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by seres

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0