Skip to content

Instantly share code, notes, and snippets.

@mekefly
Last active October 20, 2022 06:01
Show Gist options
  • Save mekefly/d947d9e3b75bb65a1c8eb4c1f3994365 to your computer and use it in GitHub Desktop.
Save mekefly/d947d9e3b75bb65a1c8eb4c1f3994365 to your computer and use it in GitHub Desktop.
自动切换中英文的全局ahk脚本.md

🧲 相关:

[[AutoHotkey]] [[CmdSilenceReturn]] [[AutoHotKey脚本KeyWaitAny]]

🗓️ 创建日期: [[2022-10-20#12:50]]

自动切换英文,直接坚听i是没办法切换回来的,因为还有ciw,等类似的命令,好费劲

依赖

拿走留个👍不过分吧

#Include, CmdSilenceReturn.ahk
#Include, KeyWaitAny.ahk

;1033 是英文
AutomaticSwitchingInputMethod(){
  ; 等待esc键
  KeyWaitAny("{Esc}")
  ; 切换为英文
  cmdSilenceReturn("im-select.exe 1033")
}
While(true){
  AutomaticSwitchingInputMethod()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment