Code: Select all
a::
send {b}
return
c::
send {a}
return
Code: Select all
a::
send {b}
return
c::
send {a}
return
Code: Select all
$a::
Send, b
return
$c::
Send, a
return
Thank you. What if I want to use this?rdllngr wrote:Include "$" before the hotkey.
It forces the hook in the hotkey.
Code: Select all
$a:: Send, b return $c:: Send, a return
Code: Select all
capslock & a::
Code: Select all
$a::
while GetKeyState("CapsLock", "P")
{
Send, b
KeyWait, a
return
}
return
$c::
Send, a
return
Interesting, but what exactly do you mean by "It forces the hook in the hotkey."?rdllngr wrote:Include "$" before the hotkey.
It forces the hook in the hotkey.
Code: Select all
$a:: Send, b return $c:: Send, a return
From Ahk Docsrdllngr hat geschrieben:
Include "$" before the hotkey.
It forces the hook in the hotkey.
Code: [Alles auswählen]GeSHi © Codebox Plus
$a::
Send, b
return
$c::
Send, a
return
Interesting, but what exactly do you mean by "It forces the hook in the hotkey."?
I understand the words, but I don't get the meaning...
$
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.
Users browsing this forum: No registered users and 58 guests