AHK: pushing 1, send ALT-W then 1, ends in a loop

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
MrFlexible
Posts: 2
Joined: 31 Aug 2016, 14:03

AHK: pushing 1, send ALT-W then 1, ends in a loop

31 Aug 2016, 14:10

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
gilliduck
Posts: 265
Joined: 06 Oct 2014, 15:01

Re: AHK: pushing 1, send ALT-W then 1, ends in a loop

31 Aug 2016, 14:16

$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.
MrFlexible
Posts: 2
Joined: 31 Aug 2016, 14:03

Re: AHK: pushing 1, send ALT-W then 1, ends in a loop

01 Sep 2016, 00:06

it works really good, many thanks!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: a_riva, MSN [Bot], peter_ahk, Xeilous and 200 guests