Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wait for Macro to finish?
#1
In my macro I want to run other macros, but do some actions in between those macros. The problem is that the action is done right away instead of waiting for the running macro to finish. For example:

Code:
Copy      Help
mac "My Macro Name 1"
int w=win("Microsoft Excel")
mac "My Macro Name 2"


It goes to excel right away, instead of going to excel once "My Macro Name 1" is finished.
#2
Usually don't need to run another macro. Convert it to function (in Properties dialog) and call:
Code:
Copy      Help
My_Macro_Name_1 ;;call function "My_Macro_Name_1" that is converted from macro "My Macro Name 1"
int w=win("Microsoft Excel")
My_Macro_Name_2

But if want to run the macros in another thread and wait, use this:
Code:
Copy      Help
wait 0 H mac("My Macro Name 1")
int w=win("Microsoft Excel")
wait 0 H mac("My Macro Name 2")
And in Properties either convert them to functions or select "Run simultaneously". Don't need it if this script itself is a function or a run-simultaneously macro.
#3
cool thanx!


Forum Jump:


Users browsing this thread: 1 Guest(s)