Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
From filter function pass a parameter to another function
#1
Hi,

When I press the hotkeys Alt+Enter in the QM window, I want to pass a parameter to another function(hello) from the filter function(A_Y_FF)  

The code below can be executed successfully, but there will be an alarm sound. How can I eliminate the alarm sound, or is there any other better solution? 

Thanks in advance for any suggestions and help
David

Function A_Y_FF
Trigger AY //A_Y_FF     Help - how to add the trigger to the macro
 
Code:
Copy      Help
;/
function# iid FILTER&f

str w1="Quick Macros -"

sel wintest(f.hwnd F"{w1}" "" "" 16)
,case 1
,mac "hello" "" "QM"

ret -2

Function hello
Code:
Copy      Help
function str's

out s
#2
ret -2 cancels the trigger, therefore its "Eat" option isn't applied too, and the key is passed to the active window, which then plays the sound. Use ret -1.
#3
That's right, thank you!


Forum Jump:


Users browsing this thread: 1 Guest(s)