test(key){
send "{key down}" ;no
; send "{%key% down}" ;no
sleep 500
send "{key up}"
}
test("w") ;test(w) doesnt work either as per the manual
%key%
works in AutoHotkey v1. For AutoHotkey v2 it says this works but it doesn't :
if InStr(MyVar, "fox")
MsgBox "The variable MyVar contains the word fox."
test(key){
send "{key down}" ;no
; send "{%key% down}" ;no
sleep 500
send "{key up}"
}
test("w") ;test(w) doesnt work either as per the manual
%key%
works in AutoHotkey v1. For AutoHotkey v2 it says this works but it doesn't :
if InStr(MyVar, "fox")
MsgBox "The variable MyVar contains the word fox."
Share
Improve this question
edited Feb 13 at 0:30
user4157124
3,00214 gold badges31 silver badges46 bronze badges
asked Jan 20 at 15:09
kitekite
3133 silver badges15 bronze badges
0
1 Answer
Reset to default 1key:="up"
send "{" key " down}"
is equivalent to
send "{up down}"