double press for hotkey Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
scanato

double press for hotkey  Topic is solved

17 Aug 2018, 06:40

Hi, I'm new with autohotkey: my question could seem banal.

I want to get an ASC code (Send, {ASC code}) when pressing two times a key within 0.3 seconds.
This is quite simple and I found some useful topics here (https://autohotkey.com/board/topic/8912 ... ap-hotkey/).

But I need to do other stuff if I press it singularly. I make an example: if I double press "a" (within 0.3 seconds) I want to get "à" while if I press it singularly I simply want "a".
I tried with "KeyWait" but I couldn't set what happen after ErrorLevel=1.

Thank you!
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: double press for hotkey

17 Aug 2018, 10:44

Hallo,
try:

Code: Select all

~*a::SetTimer, Reset_HotString, -300
:*?:aa::à
Reset_HotString:
SendLevel 1
Send,{Click up}
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ht55cd3 and 239 guests