Sign in to follow this  
Followers 0
Guest Yeah

How To Pause A Script

5 posts in this topic

How I can set a HotKey to pause / resume a script?

Thanks

Share this post


Link to post
Share on other sites



How I can set a HotKey to pause / resume a script?

Thanks

<{POST_SNAPBACK}>

Did you have a look at the helpfile ? it has an example for HotKeyset that just does what you are asking...

:ph34r:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Yeah, here

Another single example, too...

HotKeySet("{PAUSE}", "_Pause"); PAUSE
HotKeySet("+{PAUSE}", "_UnPause"); SHIFT + PAUSE

ProgressOn( "Loop", "Progressing..", "", -1, -1, 16)
For $y=1 to 100
   $pauSet= $pauSet
   ProgressSet( $y, $y & '%', $pauSet)
   Sleep(500)
Next
Exit

Func _Pause()
   Global $pauSet= 1
   While $pauSet
   WEnd
EndFunc
 
 Func _UnPause()
   Global $pauSet= 0
EndFunc

Share this post


Link to post
Share on other sites

I too have been attempting to use a pause/resume hotkey in my script. The script (which just outputs some text based on certain events on the screen) works fine in Notepad, and the hotkey pause/resumes as it should. However, when I run the computer game Final Fantasy XI (which I designed the script for) the hotkeys do not work. I have attempted to use Ctrl-x, the Pause key, and the End key as hotkeys. All work outside the game, none work inside the game. I'm guessing FFXI somehow disables the HotKeySet function from being activated, so is there a way around this? Except for the pause/resume hotkey thing, the script works perfectly in game.

Additionally, a friend of mine who has been attempting a similar thing mentioned that his GUI automation program has a pause/resume hotkey built into the program, instead of having to be written into a script. Does AutoIt have such a pause/resume hotkey built in?

Thanks,

Malizia

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