[Moderator's note: Topic moved from Bug Reports.]
Hi I need some help with AHK script
a & Space::Left
d & Space::Right
w & Space::Up
6::exitapp
"Error at line 1
Line Text: *a & Space::
Error: Invalid hotkey."
I tried to change code to ANSI
nothing.
I tried to change keyboard language to English
nothing.
i tried to use example script with &
"Numpad0 & Numpad2::
Run Notepad"
script started but when i use scrout nothing happend
invalid hotkey
Re: invalid hotkey
Maybe a & Space::Send {Left} is sufficent. According to the documentation on remappings, the remapping a::b causes this,
Good luck.
and since custom combination hotkeys do not accept the wildcard *, you get the error. From custom combination hotkeys documentationCode: Select all
*a:: SetKeyDelay -1 ; If the destination key is a mouse button, SetMouseDelay is used instead. Send {Blind}{b DownTemp} ; DownTemp is like Down except that other Send commands in the script won't assume "b" should stay down during their Send. return *a up:: SetKeyDelay -1 ; See note below for why press-duration is not specified with either of these SetKeyDelays. Send {Blind}{b Up} return
To mimic the remap, you can try,Unlike a normal hotkey, custom combinations act as though they have the wildcard (*) modifier by default.
Code: Select all
a & space::
SetKeyDelay -1
Send {Blind}{left DownTemp}
return
a & space up::
SetKeyDelay -1
Send {Blind}{left Up}
return
Re: invalid hotkey
Custom combination hotkeys (a & b) and remapping (a::b) are mutually-exclusive; you cannot combine them. This is by design.
Re: invalid hotkey
I realized that it was trivial to support custom combinations for remapping by simply omitting * when space-&-space is detected, so v1.1.27.01 will support it.
However, I think the OP's hotkeys are backwards. They are very awkward to activate, since you must press and hold a/d/w before space. If you swap them around (Space & a::), it is easy to use a/d/w as arrow keys while holding Space.
However, I think the OP's hotkeys are backwards. They are very awkward to activate, since you must press and hold a/d/w before space. If you swap them around (Space & a::), it is easy to use a/d/w as arrow keys while holding Space.