Hi guys,
I am a AHK beginner and would like to send a simple code combination.
When pushing 1, Send ALT-W then 1
If I script it this way
1::
send, !w1
return
it ends in a loop.
Thanks for any help!
Eddie
AHK: pushing 1, send ALT-W then 1, ends in a loop
-
- Posts: 2
- Joined: 31 Aug 2016, 14:03
Re: AHK: pushing 1, send ALT-W then 1, ends in a loop
$1::
This is usually only necessary if the script uses the Send command to send the keys that comprise the hotkey itself, which might otherwise cause it to trigger itself. The $ prefix forces the keyboard hook to be used to implement this hotkey, which as a side-effect prevents the Send command from triggering it. The $ prefix is equivalent to having specified #UseHook somewhere above the definition of this hotkey.
That should help.
This is usually only necessary if the script uses the Send command to send the keys that comprise the hotkey itself, which might otherwise cause it to trigger itself. The $ prefix forces the keyboard hook to be used to implement this hotkey, which as a side-effect prevents the Send command from triggering it. The $ prefix is equivalent to having specified #UseHook somewhere above the definition of this hotkey.
That should help.
-
- Posts: 2
- Joined: 31 Aug 2016, 14:03
Re: AHK: pushing 1, send ALT-W then 1, ends in a loop
it works really good, many thanks!