Hack Forums
[C] AHK question - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] AHK question (/showthread.php?tid=5612929)



AHK question - SIM-3092053 - May 1, 2017

I want to bind Numpad4 to click and Numpad5::shift
so I write the code
Numpad4::Click
Numpad5::shift
and that works but I also want it that when I press Numpad5 and Numpad4 at the same time, it performs a shift-click but for some reason this does not work in the game i'm trying to play. So I tried something like:
Numpad4+Numpad5::shift+click
but it doesn't work, any tips?


* - OnePlus6 - May 1, 2017

Code
Numpad4 & Numpad5::
        Send {Shift Down}
        Send {LButton Down}
        Sleep 1000
        Send {LButton Up}
        Send {Shift Up}
return

Just wrote it on mobile so cannot check it, but something like this should be fine. You can obviously change the sleep value; it's in ms.