GoldenDict - ScanPopup by Double Click「双击取词」©🚩🌱

That is GoldenDict double-click Scan Popup AutoHotKey (Standalone EXE)「这是一个用于Window的基于AutoHotKey实现的双击取词工具」

How to install「安装」:

  1. Move Scan popup.exe into GoldenDict installed Folder (GoldenDict.exe and Scan popup.exe at Same Folder) 「将Scan popup.exe放到GoldenDict.exe所在的目录」
  2. Create Desktop Shortcut「为Scan popup.exe创建一个桌面快捷方式」
  3. move Desktop Shortcut to GoldenDict Program Shortcut Folder for easy operating. [C:\ProgramData\Microsoft\Windows\Start Menu\Programs\GoldenDict]

How to Use「使用」:

  1. run Scan popup.exe「启动Scan popup.exe
  2. it will start to system tray on suspend mode.「启动后的应用驻留系统托盘区且为暂停模式

Suspend mode means that hotkey is disabled.「暂停模式意味着取词功能未启用」

  1. run GoldenDict and close to system tray.「启动GoldenDict并将其关闭至系统托盘区」
  2. don’t use built-in scan popup.
  3. right-click Hotkey and uncheck suspend hotkeys「通过取词工具的托盘区右键菜单取消暂停模式

  1. Hockey will be enabled.「双击取词已被激活」

  1. on double-clicking any selected text content, you get a popup definition window.「通过双击选取文字内容来使用GoldenDict的ScanPopup功能」

NOTE: use whenever you need it and put it in suspend mode after that. So it doesn’t bother you.

注意:不用时请将其设置为暂停模式,以避免其对系统或其它应用造成不必要的影响。

Tested:

Download Scan popup with this full document:

Netdisk is available with Access Key到网盘下载该Scan Popup取词工具


~LButton::

  Loop {
    LButtonDown := GetKeyState("LButton","P") 
    If (!LButtonDown)
      Break
  }

WaitTime:=DllCall("GetDoubleClickTime")/4000
KeyWait, LButton, D T%WaitTime%
If errorlevel=0
   GoSub, Routine
Return


Routine:
{

  ifwinactive ahk_class CabinetWClass
  {
    return
  }

  clipboard = 
  send ,^c
  ClipWait,1

  StringLen, cliplen, clipboard
  if cliplen > 20
  { 
    ; Avoid sending things that are not English words to GoldenDict for translation.
    return
  }

  if cliplen < 2
  {   
    ; Avoid sending things that are not English words to GoldenDict for translation.
    return
  }


; send,{Ctrl down}cc{Ctrl up} can use this line or down

run GoldenDict.exe  %clipboard%

}

return