Text signature activation

Get help with using AutoHotkey and its commands and hotkeys
MadAsKiwi
Posts: 6
Joined: 11 Feb 2018, 16:00

Text signature activation

22 Oct 2018, 21:16

Hi all

I have been using AHK for many years to populate several signatures that I use on a day to day basis. These have always been activated by using ctrl+shift+[letterhere], the letterhere being a letter that directly relates to one of the signatures (one example here):

Code: Select all

^+r::Send {enter}{enter}Cheers{enter}{enter}Rob{enter}Digital Services
I have now struck a situation where I would like to create one of these that would be activated by pressing the - sign twice (minus sign to the left of backspace key, not on the numberpad), so would go something like ctrl+shift+-- (I hope that makes sense).

Unfortunately my lack of experience has prevented me from making this happen. Is it possible to have this as a hotkey activation? If so, how am I best to write this?

Many thanks in advance

Rob
eqv
Posts: 66
Joined: 18 Sep 2018, 22:17

Re: Text signature activation

22 Oct 2018, 22:06

MadAsKiwi wrote:
22 Oct 2018, 21:16
I have now struck a situation where I would like to create one of these that would be activated by pressing the - sign twice (minus sign to the left of backspace key, not on the numberpad), so would go something like ctrl+shift+-- (I hope that makes sense).
Try this:

Code: Select all

^+-::
KeyWait, -
KeyWait, -, D T0.1	;; 0.1 = time for double press
If !(ErrorLevel)
Msgbox, Replace me with send.
Return
• Change the "0.1" (seconds) for a higher number, if need a "slower" double press.
[note: "^+-" activate the script; and "KeyWait" waits the double press]
MadAsKiwi
Posts: 6
Joined: 11 Feb 2018, 16:00

Re: Text signature activation

23 Oct 2018, 18:22

eqv wrote:
22 Oct 2018, 22:06
Try this:

Code: Select all

^+-::
KeyWait, -
KeyWait, -, D T0.1	;; 0.1 = time for double press
If !(ErrorLevel)
Msgbox, Replace me with send.
Return
• Change the "0.1" (seconds) for a higher number, if need a "slower" double press.
[note: "^+-" activate the script; and "KeyWait" waits the double press]
Absolutely perfect!! Added my send signature text and changed 0.1 to 0.3 as a precaution, and all working exactly as I was after.

Many thanks for your help :thumbup:

Cheers

Rob

Return to “Ask For Help”

Who is online

Users browsing this forum: CarPiotr, Herchi and 55 guests