Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trigger - if mouse button held for certain period of time?
#10
When need to assign 2 or more existing filter functions to a macro, you can instead assign new filter function that calls these filter functions. Then you don't have to edit the existing functions.

Simple example.
Here FF_A and FF_B are existing filter functions. FF_A_and_B is new filter function.
Don't forget to check "This function is a filter function" in Properties.

Macro Macro1281
Trigger CSa //FF_A_and_B     Help - how to add the trigger to the macro
Code:
Copy      Help
mes "macro"

Function FF_A_and_B
Code:
Copy      Help
;/
;Allows starting macro only in QM window AND only if Caps Lock is on.

function# iid FILTER&f

iid=FF_A(iid f); if(iid<=0) ret iid

;if need more filter functions:
;iid=FF_C(iid f); if(iid<=0) ret iid
;iid=FF_D(iid f); if(iid<=0) ret iid
;...

ret FF_B(iid f)

Function FF_A
Code:
Copy      Help
;/
;Allows starting macro only in QM window.

function# iid FILTER&f

if(wintest(f.hwnd "" "QM_Editor")) ret iid

Function FF_B
Code:
Copy      Help
;/
;Allows starting macro only if Caps Lock is on.

function# iid FILTER&f

ifk(K 1) ret iid


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)