button spam releases manually held keys? [SOLVED] Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
PlainPlaying
Posts: 1
Joined: 21 Sep 2020, 06:59

button spam releases manually held keys? [SOLVED]

21 Sep 2020, 07:09

I am trying to make a script that spams the buttons x,z while you are holding Ctrl+Alt+F4, And it isn't working, It doesn't press the x,z after one time it does press them, and than it stops, When I tested it, I found that after the first time it pressed x,z the Ctrl and Alt stopped being pressed for no apparent reason, Here's the code:

Code: Select all

SendMode Input
Loop
{	
	If (getKeyState("Ctrl","P") && GetKeyState("F4", "P") && getKeyState("Alt","P")){
		Send {x down}{x up}
		Send {z down}{z up}
	}
}
return
Can somone help me?
Last edited by PlainPlaying on 21 Sep 2020, 08:27, edited 1 time in total.
User avatar
Yakshongas
Posts: 590
Joined: 21 Jan 2020, 08:41

Re: button spam releases manually held keys?  Topic is solved

21 Sep 2020, 08:15

Code: Select all

SetKeyDelay, 50, 50

<^<!F4::
While, GetKeyState("LControl", "P") && GetKeyState("LAlt", "P") && GetKeyState("F4", "P")
{
    Send, xz
}
Return
Please mark your topics as solved if you don't need any further help. ✅

Need a little more help? Discord : Yakshongas#9893 🕹

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: gwarble, LongHaul, Tech Stuff and 108 guests