wlhunag wrote:Of course it works since then.
I still use it in Chrome 28
- Code: Select all
~LButton::
Loop {
LButtonDown := GetKeyState("LButton","P")
If (!LButtonDown)
Break
}
WaitTime:=DllCall("GetDoubleClickTime")/4500
KeyWait, LButton, D T%WaitTime%
If errorlevel=0
GoSub, Routine
Return
Routine:
{
clipboard =
ifwinactive ahk_class CabinetWClass
{
return
}
ifwinactive ahk_class ATL:000000014015A8C0
{
return
}
sleep,50
send ,{Ctrl down}c{Ctrl up}
clipboard = %clipboard%
ClipWait,0.05
StringLen, cliplen, clipboard
if cliplen > 20
{
;avoid non-English string
return
}
if cliplen < 2
{
;avoid non-English string
return
}
run D:\XXXXXX\GoldenDict\GoldenDict.exe %clipboard%
; send,{Ctrl down}cc{Ctrl up}
return
}
return
Please edit the last third line, so that it match the GoldenDict folder you use now. For example:
- Code: Select all
run D:\Downloads\Dictionaries\GoldenDict-1.5.0-RC-11-g6a39192_(QT_4_8_4)(Abs62)\GoldenDict\GoldenDict.exe %clipboard%
Thank you so much! It works so well!!
Just one more thing though (ignore me if you don't have time)
Is it possible to change the behavior to launching scan pop-up when highlighting text but not just a double click?
This will be useful when I want to look up the definition of a phrase.
Thank you again~