Sign in to follow this  
Followers 0
McDope

Howto write a func for pausing the script?

3 posts in this topic

hi,

i´m try to write a func for pausing/resuming my script on hotkey.

pausing will work fine but unpausing not...

Here my funcs:

Func _UnPauseMe()
    $unpaused = 1
EndFunc

Func _PauseMe()
    $unpaused = 0
    HotKeySet("{PGDN}")  ;-> unregister hotkey for pausing
    HotKeySet("{END}", "_UnPauseMe")  ;-> register hotkey for pausing
    GUICtrlSetData($_status, "LaunchHelper is paused now...")
    While $unpaused <> 1
        Sleep(15000)
    WEnd
    GUICtrlSetData($_status, "LaunchHelper is resuming now...")
    HotKeySet("{PGDN}", "_PauseMe")  ;-> register hotkey for pausing
EndFunc

any hint to make it work?


Share this post


Link to post
Share on other sites



hi,

i´m try to write a func for pausing/resuming my script on hotkey.

pausing will work fine but unpausing not...

Here my funcs:

Func _UnPauseMe()
    $unpaused = 1
EndFunc

Func _PauseMe()
    $unpaused = 0
    HotKeySet("{PGDN}") ;-> unregister hotkey for pausing
    HotKeySet("{END}", "_UnPauseMe") ;-> register hotkey for pausing
    GUICtrlSetData($_status, "LaunchHelper is paused now...")
    While $unpaused <> 1
        Sleep(15000)
    WEnd
    GUICtrlSetData($_status, "LaunchHelper is resuming now...")
    HotKeySet("{PGDN}", "_PauseMe") ;-> register hotkey for pausing
EndFunc

any hint to make it work?

There's an actual pause function written under HotKeySet() "_TogglePause()"

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

ooh, thank you ^^

lol, sry didn´t knew that -.-

Edited by McDope

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