Need help making a pause button.

Ask gaming related questions
nillx
Posts: 6
Joined: 10 Jan 2024, 12:07

Need help making a pause button.

10 Jan 2024, 14:24

Hello, im using AHK to spam my buttons in World of Warcraft while holding them down instead of spam pressing. Is there a way to make it pause or stop the script with another button? Its hard to type ingame when the script is running.


[Mod action: Moved topic to the Gaming section.]
User avatar
boiler
Posts: 17329
Joined: 21 Dec 2014, 02:44

Re: Need help making a pause button.

10 Jan 2024, 16:00

It sounds like you just want a hotkey to suspend your other hotkeys (and press again to toggle them back on again). Try this:

Code: Select all

F1::Suspend
nillx
Posts: 6
Joined: 10 Jan 2024, 12:07

Re: Need help making a pause button.

10 Jan 2024, 17:33

That does change the AHK icon to [| |} but it doesnt stop the spam. Im using this script for each button i want to be spammed.

Code: Select all

#HotIf WinActive("World of Warcraft")
$f:: {
    while GetKeyState("f", "P")
    {
        Send("f")
        Sleep(Random(75, 150))
    }
}
#HotIf
nillx
Posts: 6
Joined: 10 Jan 2024, 12:07

Re: Need help making a pause button.

10 Jan 2024, 17:43

Thanks, that does work but is there a way to make it resume?
User avatar
boiler
Posts: 17329
Joined: 21 Dec 2014, 02:44

Re: Need help making a pause button.

10 Jan 2024, 17:54

I'm not following your last two posts as they seem to be in conflict with each other. For the line that I posted, you use the same hotkey to toggle hotkeys on and off. You can make a hotkey with Pause instead of resume to pause execution, as opposed to suspending hotkeys.
nillx
Posts: 6
Joined: 10 Jan 2024, 12:07

Re: Need help making a pause button.

10 Jan 2024, 19:36

Yeah im sorry about the first post, i couldnt edit it. Suspend function works but it only turns it off, pressing it again does nothing. Tried using Pause but it does nothing, AHK is still spamming the button when im holding it.
User avatar
boiler
Posts: 17329
Joined: 21 Dec 2014, 02:44

Re: Need help making a pause button.

10 Jan 2024, 19:53

Sorry. I was caught in old v1 thinking. Do this:

Code: Select all

#SuspendExempt
F1::Suspend
#SuspendExempt False
nillx
Posts: 6
Joined: 10 Jan 2024, 12:07

Re: Need help making a pause button.

10 Jan 2024, 20:07

Lovely, thank you so much! :clap:

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 9 guests