 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Tobias Guest
|
Posted: Wed Mar 12, 2008 6:57 pm Post subject: Hotstrings |
|
|
When using hotstrings, it's sometimes desirable to interrupt the hotstring recognition algorithm, e.g.
let's assume "AHK_" (_ being a space) is a hotstring for AutoHotKey.
You have a hotkey typing some text for you, e.g. Capslock & t types "text ".
Now you wish to type
"a text hk" typing "a" "Capslock+t" "hk" and the AHK hotstring fires unintentionally despite the hotkey action in between. How can you efficiently reset the hotstring recognizer? I have found arrow keys and Lclick/Rclick to work as described in the helpfile but these may all interfere with the intended function when added to the hotkey function.
=> Q: is there any other way (not triggering anything in windows/programs) to reset the hotstring recognozer?
THANK YOU! 2008-03-12 18:56 Tobias |
|
| Back to top |
|
 |
instantrunoff
Joined: 13 Jan 2008 Posts: 76
|
Posted: Sat May 17, 2008 10:06 pm Post subject: |
|
|
This is an interesting question. One solution may be to use Suspend, which affects hotstrings but not the current thread. For example, | Code: | Capslock & t::
Suspend On
Send text
Suspend Off
return |
I'd be curious if this in effect resets the hotstring recognizer. Using Input rather than a hotstring may be desirable. Another, more complicated and uglier possibility may be to have the hotstring itself verify the preceding text, e.g. | Code: | ::AHK ::
Send {shift down}{left 4}{shift up}^c
ClipWait
If clipboard = "AHK "
Send AutoHotkey
else
Send {right}
return |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|