|
发表于 2017-8-2 11:24:45
|
显示全部楼层
奉献个人使用的 Firefox 浏览器取词 AutoHotkey 代码。3 ^1 s9 A$ N- ?; d* \% s
1 W; A0 J z0 g- W+ {. B; 左键双击单词:实现在 Firefox 中双击单词取词 [0 a `) w' ~6 x
#IfWinActive ahk_class MozillaWindowClass
8 f2 K; d$ ?1 e5 o% ~- [2 w~LButton:: R: l7 {; J2 A v8 D1 m
If (A_PriorHotkey <> "~LButton" Or A_TimeSincePriorHotkey > 300) {+ h+ E& t) {7 F3 w4 r0 Y
KeyWait, LButton& y% z) @: o, f& Z: A
Return4 J( V6 l0 T) m" p- C
}
" }( S% J3 L5 g- {' `; S) h/ \6 j9 z oldClipboard := Clipboard4 l1 h% W. K7 a- x
Send, ^c
" x. Y& ]: k v" e, _ Sleep, 300$ X- [$ `" i8 Q/ U% h
If (Clipboard <> "")
3 Z! M! E' [% b; s4 P% P9 r Run, D:\Portable\GoldenDict\GoldenDict.exe %Clipboard% ; 请自行修改 GoldenDict 路径
/ r, L: S: U. d/ o8 J& X) m Clipboard := oldClipboard
( |4 K, A& R1 w: A2 L; q Return
% l4 W3 L! U4 ^#If |
|