Giving priority + combinations

Get help with using AutoHotkey and its commands and hotkeys
recs999
Posts: 9
Joined: 15 Jun 2017, 05:14

Giving priority + combinations

18 Jun 2017, 09:25

I have a problem that then I rapidly hit q and e, the script doesnt work properly. Maybe you have some ideas?
Spoiler

I understood, i have to make a prior of a last pressed key and deactivate previous one.
Moreover, it does not work with combination of other keys, like control, shift etc.
Found one more bug. When I am pressing W and then Q, then releasing q, w has no effect. I understand why it happens (because when i release q it sets w to UP), but I dont know how to fix that, chech if initial w is pressed?
Rohwedder
Posts: 549
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Giving priority + combinations

18 Jun 2017, 11:23

Hallo,
perhaps this way?

Code: [Select all] [Download] GeSHi © Codebox Plus

#InstallKeybdHook
q::
If !GetKeyState("w", "P")
Send {w Down}
Send {, down}
KeyWait q
If !GetKeyState("w", "P")
Send {w Up}
Send {, Up}
Return
recs999
Posts: 9
Joined: 15 Jun 2017, 05:14

Re: Giving priority + combinations

18 Jun 2017, 11:32

Rohwedder wrote:Hallo,
perhaps this way?

Code: [Select all] [Download] GeSHi © Codebox Plus

#InstallKeybdHook
q::
If !GetKeyState("w", "P")
Send {w Down}
Send {, down}
KeyWait q
If !GetKeyState("w", "P")
Send {w Up}
Send {, Up}
Return


yeap, that works perfectly, one problem is solved, still trying to change priority
Rohwedder
Posts: 549
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Giving priority + combinations

19 Jun 2017, 00:29

Hallo,
perhaps another way:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Bunny_fairfax and 46 guests