Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FF_rightclick: Two triggers
#1
i have two FF_rightclick triggers, one for caption and the other for client.

the caption function is for moving windows between my monitors.
when the client function is enabled too, the caption function is sometimes interfered.

both are set to eat + When released.

Function FF_rightclick
Trigger #Rh1 //FF_rightclick     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
;int+ _xm = xm
;int+ _ym = ym

int+ lhwnd = f.hwnd
if(!f.hwnd2) ret -2
sel _s.getwinexe(f.hwnd) 1
,case "qm"
,,if cla="#32768" && win_exe="explorer"
,,,mac "menu_right"    
,,if(GetWinId(f.hwnd2)=1287)
,,,_s.getsel()
,,,out _s
,case "Dreamweaver"
,,if(GetWinId(f.hwnd2)=59419) mac "dw_close_internal"
,;case "scite"
,,;if(GetWinId(f.hwnd2)=354) mac "scite_tab"
,case "flash"
,,if(GetWinId(f.hwnd2)=100)
,,,mac "flmx_lib_right"
,case "explorer"
,,if(wintest(f.hwnd "" "Shell_TrayWnd"))
,,,if(childtest(f.hwnd2 "Quick Launch" "ToolbarWindow32" f.hwnd))
,,,,mac "quicklaunch"
,,,,ret -1
,;case "firefox"
,,;mac "MC_First";ret -1
,;case "devenv"
,,;;if(childtest(f.hwnd2 "" "VsTextEditPane"))
,,,;;if xm(0 f.hwnd2)<16
,,,,;;mac "devenv_code"
,,,,;;ret -1
,,
,case else ret -2 ;;default action in other programs


,,

Function move1_2
Trigger #Rh2     Help - how to add the trigger to the macro
Code:
Copy      Help
int hwnd=win(mouse)
act hwnd
;0.2
int x y cx cy; GetWinXY hwnd x y cx cy
;;out x+1600
if x<1600
,mov x+1600 y "" 4
else
,mov x-1600 y "" 4
;mov 120 120 "" 4
pi
#2
i unchecked When released. now it works.
pi
#3
unchecked gives the Trigger full attention, right?
pi
#4
How they interfere?

To test, I created simple function
Function move1_2
Trigger #Rh2     Help - how to add the trigger to the macro
Code:
Copy      Help
out "move1_2"
and filter function
Function FF_rightclick
Trigger #Rh1     Help - how to add the trigger to the macro
Code:
Copy      Help
out "FF_rightclick"
ret -2

They work like should. When I right click on caption, displays "move1_2". When client, displays "FF_rightclick" and disables right button.

Maybe interfere because FF_rightclick runs on button down and changes something. move1_2 runs on button up.


Forum Jump:


Users browsing this thread: 1 Guest(s)