Do not allow double key being pressed once again

Get help with using AutoHotkey and its commands and hotkeys
Banayat
Posts: 5
Joined: 08 Jul 2018, 14:29

Do not allow double key being pressed once again

17 Aug 2018, 12:12

Hi folks, I am pretty new to all of this. I got a question after hours of trying^^: How can I prevent a mouse key from being pressed more than two times? Also, I got an error message for: "if quickclicks > 0" which says "this variable has not been assigned a value" but quickclicks is declared "1". Any Suggestions? ;)

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

Rohwedder
Posts: 1284
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Do not allow double key being pressed once again

18 Aug 2018, 03:37

Hallo,
try:

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

Banayat
Posts: 5
Joined: 08 Jul 2018, 14:29

Re: Do not allow double key being pressed once again

18 Aug 2018, 06:36

Now I understand what I did wrong at the very beginning. Thank you for your help Rohwedder, it works like a charm :) Now, I wonder why there are two "#MaxThreadsPerHotkey" functions indicated. What if I leave one of it out?
Rohwedder
Posts: 1284
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Do not allow double key being pressed once again

18 Aug 2018, 09:09

Hallo,
try, comment or delete "#MaxThreadsPerHotkey 2" and you will never get: "Key got clicked thrice".
Because there is the "Sleep, 1000" in the part "Key got clicked twice" one need a second thread.

Return to “Ask For Help”

Who is online

Users browsing this forum: chngrcn and 87 guests