Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
different actions based on window focus, same trigger
#1
I want to use the same key stroke to do different actions depending on what window has focus.

I am able to use functions with the following scopes(1and2) with separate triggers.
But how to merge them into one trigger I can't figure out. I tried doing it within the text of one macro with no functions but no luck.

1.
if(id(30003 f.hwnd)) ret iid
2.
if(wintest(f.hwnd "" "CabinetWClass")) ret iid
if(wintest(f.hwnd "Save As" "")) ret iid
if(wintest(f.hwnd "Save Attachment" "")) ret iid
if(wintest(f.hwnd "New Folder" "")) ret iid

My macros are done and the scope is laid out. I just can't figure out how to implement it.
Any help appreciated
#2
if(id(30003 f.hwnd)) ret "Macro1"
if(wintest(f.hwnd "" "CabinetWClass")) ret "Macro2"
if(wintest(f.hwnd "Save As" "")) ret "Macro2"
if(wintest(f.hwnd "Save Attachment" "")) ret "Macro2"
if(wintest(f.hwnd "New Folder" "")) ret "Macro2"


Forum Jump:


Users browsing this thread: 1 Guest(s)