Sign in to follow this  
Followers 0
Outlaw

Hotkey to End Loop??

8 posts in this topic

I got my macro running works so far but I've set it to loop back to start. I just want hit pause to stop the thing thanks :whistle:

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

.. or you could just right-click on the icon in the System Tray and select "Exit" :whistle:

Edited by trids

Share this post


Link to post
Share on other sites

in 3.0.85 this would do what you want.... it loops till Pause is pressed.

HotKeySet ( "{PAUSE}" ,"Stop")

While 1

sleep(100)

Wend

Func Stop()

MsgBox(0,"Stop","Stopped Looping")

exit

EndFunc


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

HotKey support is in the unstable version folder. Currently trying to get all the bugs out. Make sure you don't loop yourself while using it.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

its ok i just used macro express to run it with hotkey, and terminate.

Share this post


Link to post
Share on other sites

To use this script, would you replace PAUSE with another control so that is used to activate it? For I'm trying to make an on/off fishing/curing script for FFXI. By the way, the curing script is 1337 :whistle:

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I wrote a few, but I like Larry's code a bit better. The use of adlib is very clean for this. I think it went something like this.

AdlibEnable("pause"); adlib will keep the pause function running


HotKeySet("{pause}","pauseset"); this toggles on and off with Pause key
$Pause = -1; I prefer to start it in Pause mode
sleep(1000)
While 1
; place whatever you want to do here.
send("1")
sleep(1000)
Wend

Func pauseset(); this toggles the value of $pause
   $Pause = $Pause * -1
EndFunc

Func pause(); this sleeps when $pause is -1 and doesn't when $pause =1
   While $Pause = -1
        Sleep(500)
   Wend
EndFunc
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

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