Help to combine some AHK code Topic is solved

Ask gaming related questions
Draco 123

Help to combine some AHK code

21 Feb 2018, 08:22

HI guys I'm struggling to combine some code, but with what I have I can only get half of it to work.
The following is what im trying to achieve.
While right mouse button is held down I want to achieve 2 things: "'\'' to be held down(but not spammed or released), until right mouse is released, but also ''['' to be spammed repeatedly until right mouse button is released. I can get one or the other to work but not both at the same time with one Right mouse button hold. Heres what I have so far, any help completeing this code would be greatly appreciated :)


~RButton:: ;"~": When the hotkey fires, its key's native function will not be blocked
sleep 100

While GetKeyState("RButton","P")
Send, {[}

SEND, {\ Down}
KeyWait, RButton
SEND, {\ Up}

Return
Rohwedder
Posts: 1527
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Help to combine some AHK code  Topic is solved

22 Feb 2018, 13:41

Hallo,
try:

Code: Select all

~RButton:: ;"~": When the hotkey fires, its key's native function will not be blocked
Sleep 100
Send, {\ Down}
While GetKeyState("RButton","P") ;loops until right mouse button is released
{
	Send, [
	Sleep, 100
}
Send, {\ Up}
Return
Draco123

Re: Help to combine some AHK code

22 Feb 2018, 18:02

Thnx works well cheers :).

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 25 guests