我在我的电脑上使用了几种语言,我经常使用自动热键在它们之间切换。
在一种情况下,我编写了一个脚本来在弹出窗口中切换到英文以保存文件或网页,wintitle 为ahk_class #32770
. 它不起作用。奇怪的是相同的代码适用于ahk_exe Explorer.EXE
窗口。
这是代码:
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
en := DllCall("LoadKeyboardLayout", "Str", "00000409", "Int", 1)
#if winactive("ahk_class #32770") or winactive("ahk_exe Explorer.EXE")
f4::
PostMessage 0x50, 0, %en%,, A
send,{f4}
return
我做错什么了吗?