Problem About Pause Topic is solved

Ask gaming related questions (AHK v1.1 and older)
JQ lai

Problem About Pause

11 Apr 2018, 11:44

I can resume but cant pause this script at all. What wrong with it?
u::

Loop
{
Send{S}{E}
Send{x 10}
}

Home::
pause
Hman
Posts: 32
Joined: 10 Apr 2018, 10:48

Re: Problem About Pause  Topic is solved

11 Apr 2018, 21:34

im new to this but i know if you put in

~?::Suspend

? being what ever key you want it to be

pressing said key will stop the script from running untill you press it again
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Problem About Pause

12 Apr 2018, 12:46

JQ lai wrote:I can resume but cant pause this script at all. What wrong with it?
u::

Loop
{
Send{S}{E}
Send{x 10}
}

Home::
pause
Try:

Code: Select all

u::

 Loop
  {
    Send{S}{E}
    Send{x 10}
  }

Home::
pause, toggle
I presume you meant that you could pause but not resume. That is because pause only stops the current thread unless you write it's optional parameter as "toggle". So pause, toggle should do the trick. ;)
I am your average ahk newbie. Just.. a tat more cute. ;)
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Problem About Pause

12 Apr 2018, 12:49

Hman wrote:im new to this but i know if you put in

~?::Suspend

? being what ever key you want it to be

pressing said key will stop the script from running untill you press it again
~?:: Suspend, Toggle
Without the ", Toggle" parameter the hotkey will only suspend keys.

The ~ prevents the native function from being blocked. So you will still type a while suspending hotkeys and hotstrings when you use ~a:: Suspend, Toggle
~ is a hotkey modifier

Cheers! :D
I am your average ahk newbie. Just.. a tat more cute. ;)
neverlevel
Posts: 60
Joined: 13 Apr 2016, 22:02

Re: Problem About Pause

12 Apr 2018, 17:53

F1::pause ;will toggle between pause and unpause without a modifier...i dont know about suspend
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Problem About Pause

13 Apr 2018, 02:24

neverlevel wrote:F1::pause ;will toggle between pause and unpause without a modifier...i dont know about suspend
My bad but you're right Pause toggles by default. But that's not the case with suspend.
I am your average ahk newbie. Just.. a tat more cute. ;)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 91 guests