Macro not working while shift is pressed

Ask gaming related questions (AHK v1.1 and older)
rm59
Posts: 1
Joined: 17 Jun 2017, 00:20

Macro not working while shift is pressed

17 Jun 2017, 00:30

I've been working on this script and finally got it working, but there is one issue: When holding shift, the macro is not working.

I would like for the macro to work when holding shift and not holding shift. After searching for a solution, it appears that shift acts as numlock, how do I get past this issue?

Code: Select all

#NoEnv
SendMode Input
 
_auto := true
 
~LButton::autofire()
~Numlock::_auto := ! _auto
~Up::Suspend
F1::ExitApp
 
autofire()
{
global _auto
if _auto
{
Loop
{
if GetKeyState("LButton", "P")
{

Sleep 1
mouseXY(0, 7)
Sleep 1

Sleep 25
}
else
break
} ;; loop
} ;; if
} ;; autofire()
 
mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}

Any help is greatly appreciated! Thank you.
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

Re: Macro not working while shift is pressed

17 Jun 2017, 04:11

You need the wildcard modifier symbol. You can learn more in the documentation here at https://autohotkey.com/docs/Hotkeys.htm
Also you could make a separate hotkey that includes shift. A few alternatives out there for you.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 82 guests