Can't press shift while pressing script hotkey Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Dreadnys
Posts: 2
Joined: 21 Feb 2018, 00:04
Contact:

Can't press shift while pressing script hotkey

21 Feb 2018, 00:09

Hi, the script I am using won't let me press my script hotkey (XButton1) while hold shift simultaneously. Any ideas on how to fix this? If I hold shift then press my hotkey, it cancels out my shift.

Code: Select all

Threshold = 20
*~$XButton1::
MouseGetPos, MouseX, MouseY
PixelGetColor, Color1, (MouseX+2), (MouseY+2)
StringSplit, Colorz, Color1
Color1R = 0x%Colorz7%%Colorz8%
Color1R += 0

while (GetKeyState("XButton1", "P"))
    {
        sleep 0
        MouseGetPos, MouseX, MouseY
        PixelGetColor, Color2, (MouseX+2), (MouseY+2)
        StringSplit, Colorz, Color2
        Color2R = 0x%Colorz7%%Colorz8%
        Color2R += 0
        if (Color1R > (Color2R + Threshold)) or (Color1R < (Color2R - Threshold))
            {
                Send {LButton}
            }
    }
Return

End::
exitapp
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AHK_user and 205 guests