ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Question about AutoHotkey scripting

<< < (2/4) > >>

jdd:
so.....is it correct to assume that it is not possible to create a hotkey combination in Autohotkey that is based on pressing two keys in rapid succession?

Target:
so.....is it correct to assume that it is not possible to create a hotkey combination in Autohotkey that is based on pressing two keys in rapid succession?-jdd (August 01, 2010, 06:47 PM)
--- End quote ---

no sure I'd so far as to say that, but I'm not sure how I'd approach it...

perhaps a hotkey for K that watches for a subsequent (K) key press within a defined period 

OkRob:
Not sure what you're trying to send by pressing the keys, but something like this works:


--- Code: Autohotkey ---:R*?:ttt::FormatTime, CurrentDateTime,, HH:mmSendInput %CurrentDateTime%returnPressing the "t" 3 times sends the current time in HH:mm format

To send a text string, this works:


--- Code: Autohotkey ---:R*?:ppp::SendInput This is my string of textreturnTyping "p" 3 times sends This is my string of text

Might try something along those lines if it will work for you. I use the ones above and others similar all the time to save me time with commonly typed text, etc. Note that I have them set to send after 3 keypresses as hardly any words I will ever type contain 3 of those letters in succession.

skwire:
Is it possible to create a hotkey that does not require simultaneous pressing of keys?-jdd (August 01, 2010, 01:03 PM)
--- End quote ---

Here's one method to double-tap "k".


--- Code: Autohotkey ---~k::{    If ( A_PriorHotKey = A_ThisHotKey && A_TimeSincePriorHotkey < 200 )    {        MsgBox, Success.    }}Return

jdd:
I should have been more specific.  What I want to do is to be able to type kk to simulate control-Alt-F4.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version