Last active
May 23, 2019 14:43
-
-
Save liberize/ccc4e0e27de122a6ba06479764304da4 to your computer and use it in GitHub Desktop.
autohotkey 取词并调用 wox 有道翻译
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 取词快捷键 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