Nakonec jsem to k naprosté spokojenosti vyřešil spuštěním AHK skriptu (nutno mít nainstalovaný program AutoHotkey).
Obsluhuje aplikace: Firefox, Opera, PDF X-Change Viewer, Adobe Reader
Slovo je do slovníku přeneseno po nakliknutí
Přikládám zdroják, jsou z něho patrné i klávesy pro ukončení popř. pozastavování skriptu (vhodné u obou browserů pokud klikáme mimo text - do menu apod)
Kód: Vybrat vše
#SingleInstance force
SetTitleMatchMode 3
SetTitleMatchMode RegEx
XCV_hwnd=0
Suspensed=0
;----------------------------------------------------
WinGet, id, ID, A
IfWinNotExist, \QLingea Lexicon 5\E$
{
Run "%ProgramFiles%\Lingea\Lexicon5\Lexicon.exe"
WinWait, \QLingea Lexicon 5\E$,, 5
if ErrorLevel
MsgBox, Nelze spustit Lexicon
Sleep, 100
WinActivate,ahk_id %id%
WinWaitActive, ahk_id %id%
}
;------------------------------------------- Opera ---------
#IfWinActive, ahk_class OperaWindowClass
~LButton::
MouseGetPos, Mx, My, id, Hwnd, 2
Goto,Transfer
;------------------------------------------ Firefox ----------
#IfWinActive, ahk_class MozillaWindowClass
~LButton::
MouseGetPos, Mx, My, id, Hwnd, 2
Goto,Transfer
;--------------------------------------- Adobe Reader ----------
#IfWinActive, ahk_class AcrobatSDIWindow
~LButton::
MouseGetPos, Mx, My, id, Hwnd, 2
ControlGet, OpVar, Hwnd,, AVPageView, ahk_id %id%
if (OpVar <> Hwnd)
return
Goto,Transfer
;------------------------------------ PDF X-Change Viewer ----------
#IfWinActive, \QPDF-XChange Viewer\E$
~LButton::
MouseGetPos, Mx, My, id, Cname, 1
if ("DSUI:PagesView1" <> Cname)
return
if (XCV_hwnd <> id)
{
Send, {CTRLDOWN}{Shift Down}c{CTRLUP}{Shift Up}
XCV_hwnd := id
return
}
Goto,Transfer
;----------------------------------------------------
Transfer:
if Suspensed
return
Click %Mx%, %My%
Send, {ESC}
Clipboard = ; Empty the clipboard.
Send ^c
ClipWait 1
if ErrorLevel ; ClipWait timed out.
return
Clipboard := RegExReplace(clipboard, "[""()“”`´!#$%&'*+,\-.:?@[\\\]\^_{|}~]+$", "")
ControlSend, , ^v, \QLingea Lexicon 5\E$
Return
;----------------------------------------------------
; Konec aplikačních sekcí
#IfWinActive
;=================== WIN+G ===================
; Kombinace (WIN + G) => Ukončí skript
#g::ExitApp
;=================== WIN+J ===================
; Kombinace (WIN + J) => Pozastaví/Spustí skript
#j::
Suspensed := !Suspensed
Return