Different Keyspam dependant on modifier

Ask gaming related questions (AHK v1.1 and older)
deekay
Posts: 3
Joined: 08 Dec 2015, 07:22

Different Keyspam dependant on modifier

08 Dec 2015, 09:43

Hi!

I am very new to AHK and was working on the following script for Wildstar.

Code: Select all

$~*XButton2:: 

While  getkeystate("xbutton2","P")=1 {
	if  getkeystate("xbutton2","P")=1 && getkeystate("shift","P")=1{
		Send {6 down} 
        Send {6 up}
		sleep	10
	}
	else if  getkeystate("xbutton2","P")=1 && getkeystate("shift","P")=0{
		Send {5 down} 
        Send {5 up}
		sleep	10
	}
}
return
If XMB2 is held down it should spam "5"s and if XMB2 + SHIFT is held down it should spam "6"es. Unfortunately the SHIFT combo spams "5"s and "6"es both.

Any help would be appreciated.

Best,

Daniel
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: Different Keyspam dependant on modifier

08 Dec 2015, 18:40

deekay wrote:Hi!

I am very new to AHK and was working on the following script for Wildstar.

Code: Select all

$~*XButton2:: 

While  getkeystate("xbutton2","P")=1 {
	if  getkeystate("xbutton2","P")=1 && getkeystate("shift","P")=1{
		Send {6 down} 
        Send {6 up}
		sleep	10
	}
	else if  getkeystate("xbutton2","P")=1 && getkeystate("shift","P")=0{
		Send {5 down} 
        Send {5 up}
		sleep	10
	}
}
return
If XMB2 is held down it should spam "5"s and if XMB2 + SHIFT is held down it should spam "6"es. Unfortunately the SHIFT combo spams "5"s and "6"es both.

Any help would be appreciated.

Best,

Daniel



Hi, Try This:

Code: Select all

*~XButton2::
While  getkeystate("xbutton2","P")
{
   if getkeystate("shift","P")
   {
      Send {6 down} 
      Send {6 up}
      sleep	10
   }
   else
   {
      Send {5 down} 
      Send {5 up}
      sleep	10
   }
}
return
:wave: There is always more than one way to solve a problem. ;)
deekay
Posts: 3
Joined: 08 Dec 2015, 07:22

Re: Different Keyspam dependant on modifier

09 Dec 2015, 16:56

Worked like a charm!

Thank you!
deekay
Posts: 3
Joined: 08 Dec 2015, 07:22

Re: Different Keyspam dependant on modifier

09 Dec 2015, 17:12

Cheered to early still not working inside the Wildstar client (still many 5s spammed when i hold down shift). Gonna test it if it works inside windows.

EDIT: Same in Windows

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 93 guests