Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to toggle mouse click for systray
#1
i use proxomitron for filtering websites to have better display. no ads and such.
the developer died a while ago, so the program can't be updated, because nobody got the source code.
but its working fine on all windows versions and all web related functionality does work.

the program has a systray icon, but i always felt that on left click that what should happen on right click.
i solved my problem by assigning triggers for left and right click, active on 'Hit test client'.

example code from FF_leftclick
Function FF_leftclick
Trigger #Lh1 //FF_leftclick     Help - how to add the trigger to the macro
Code:
Copy      Help
;/
function# iid FILTER&f
str cla.getwinclass(f.hwnd)    
str childclass.getwinclass(f.hwnd2)    
str win_exe.getwinexe(win());err
;out win_exe
;out childclass
;int+ _xm = xm
;int+ _ym = ym

int+ lhwnd = f.hwnd
if(!f.hwnd2) ret -2
sel _s.getwinexe(f.hwnd) 1
,case "explorer"
,,if(wintest(f.hwnd "" "Shell_TrayWnd"))
,,,if(childtest(f.hwnd2 1504))
,,,,mac "systray"
,,,,ret -1                
,
,case else ret -2 ;;default action in other programs

now on left click on systray macro systray is called.
Macro systray
Code:
Copy      Help
spe -1
Acc a=acc(mouse); err ret
if(!a.elem) ret ;;not on button
;out a.Name
if a.Name="Proxomitron default"
,a.Mouse(2)
else
,a.Mouse(1)
,;

works fine for me, no sys delay so far.
when you want to use it, then just uncomment the out a.Name line to get the text of the tray icon of your desire.

please give feedback, when you want me to explain further.
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)