AutoHotKey 脚本发送输入
AutoHotKey script SendInput
我正在尝试使用 AutoHotKey 编写一个小脚本来替换键以更改我的键盘布局。它应该像这样工作:
[=ü
{=Ü
;=ö
:=Ö
'=ä
"=Ä
]='
}="
\=;
|=:
除 :=Ö 之外的所有键都有效,这将导致 :=:
我是否正确使用了 $ 和 {Raw}?
希望我的 post 不会太混乱。 ;-)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
$[::
SendInput {Raw}ü
Return
${::
SendInput {Raw}Ü
Return
$;::
SendInput {Raw}ö
Return
$:::
SendInput {Raw}Ö
Return
$'::
SendInput {Raw}ä
Return
$"::
SendInput {Raw}Ä
Return
$]::
SendInput {Raw}'
Return
$}::
SendInput {Raw}"
Return
$\::
SendInput {Raw};
Return
$|::
SendInput {Raw}:
Return
如果有人遇到类似问题,这里有一个解决方案:$+;::
+ 是换档键。转移和; = :
我正在尝试使用 AutoHotKey 编写一个小脚本来替换键以更改我的键盘布局。它应该像这样工作:
[=ü
{=Ü
;=ö
:=Ö
'=ä
"=Ä
]='
}="
\=;
|=:
除 :=Ö 之外的所有键都有效,这将导致 :=:
我是否正确使用了 $ 和 {Raw}?
希望我的 post 不会太混乱。 ;-)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
$[::
SendInput {Raw}ü
Return
${::
SendInput {Raw}Ü
Return
$;::
SendInput {Raw}ö
Return
$:::
SendInput {Raw}Ö
Return
$'::
SendInput {Raw}ä
Return
$"::
SendInput {Raw}Ä
Return
$]::
SendInput {Raw}'
Return
$}::
SendInput {Raw}"
Return
$\::
SendInput {Raw};
Return
$|::
SendInput {Raw}:
Return
如果有人遇到类似问题,这里有一个解决方案:$+;:: + 是换档键。转移和; = :