Skip to content

Instantly share code, notes, and snippets.

@liberize
Last active May 23, 2019 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liberize/ccc4e0e27de122a6ba06479764304da4 to your computer and use it in GitHub Desktop.
Save liberize/ccc4e0e27de122a6ba06479764304da4 to your computer and use it in GitHub Desktop.
autohotkey 取词并调用 wox 有道翻译
; 取词快捷键 ctrl+shift+d
^+d::
clipboard =
Send, ^c
ClipWait, 1
StringLen, cliplen, clipboard
if (cliplen > 1000 or cliplen < 2) {
return
}
Run, %USERPROFILE%\AppData\Local\Wox\Wox.exe
WinWait, ahk_exe Wox.exe,,, Wox Settings
WinActivate
Send, ^a
SendInput, yd %clipboard%
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment