11-12-2022, 02:11 AM
Is there no other way?
Using the QM code below has no effect
Function autotext_pop3
Trigger !v"" "Au completion list"
Using the QM code below has no effect
Function autotext_pop3
Trigger !v"" "Au completion list"
int+ hwnd=TriggerWindow
int- hlv=child("" "Static" hwnd)
int hh=SetWindowsHookEx(WH_KEYBOARD_LL &sub.Hook_WH_KEYBOARD_LL _hinst 0)
opt waitmsg 1
rep
,0.2 -WV hlv
,err
,,continue
,break
UnhookWindowsHookEx hh
#sub Hook_WH_KEYBOARD_LL
function# nCode message KBDLLHOOKSTRUCT&k
if(nCode<0) goto gNext
int- hlv
int isActive=hlv
if(!isActive) SendMessage hlv WM_ACTIVATE WA_ACTIVE 0
int up=k.flags&LLKHF_UP
FormatKeyString k.vkCode 0 &_s;
if _s=","
,if(!up)
,,SendKeysToWindow2(hlv key(D))
,ret 1
if _s="."
,if(!up)
,,SendKeysToWindow2(hlv key(U))
,ret 1
if _s="/"
,out _s
,if(!up)
,,clo hwnd
,ret 1
if _s="Tab"
,if(!up)
,,SendKeysToWindow2(hwnd key(Y))
,ret 1
;gNext
ret CallNextHookEx(0 nCode message &k)