Posts: 2
Threads: 1
Joined: Oct 2015
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:
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.
Posts: 12,140
Threads: 142
Joined: Dec 2002
Usually don't need to run another macro. Convert it to function (in Properties dialog) and call:
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:
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.
Posts: 2
Threads: 1
Joined: Oct 2015