Jump to content
Sign in to follow this  
Xav

How can i PAUSE my script :)?

Recommended Posts

Baraoic

As in the sleep function? or do you mean until a user does something?

Share this post


Link to post
Share on other sites
Xav

As in the sleep function? or do you mean until a user does something?

Until a user does something , like that :

Hotkeyset("{numbpad1}" , "Break")
Func Break()
  PauseScript
endfunc
Edited by Xav

Share this post


Link to post
Share on other sites
darkjohn20

$Run = 0 ;Start script paused

HotKeySet("s", "Start") ;Start Key
HotKeySet("e", "End") ;End Key
HotKeySet("q", "Quit") ;Quit Key

While 1
    If $Run = 1 Then
        ;Your script
    EndIf
WEnd

Func Start()
    $Run = 1
EndFunc

Func End()
    $Run = 0
EndFunc

Func Quit()
    Exit
EndFunc

By end I mean pause.

Edited by darkjohn20

Share this post


Link to post
Share on other sites
darkjohn20

Thanks .. Working well <3 =D!

No problem, hehe.

Share this post


Link to post
Share on other sites
MvGulik
whatever Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.