Jump to content

help with pause


seres
 Share

Recommended Posts

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
Link to comment
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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...