I had to reread again, though still not getting it to work as hoped, the documentation and this thread are super helpful!
I am trying to reference two other macros from a single macro. The problem is as noted above that they seem to run side by side each other and reference macro 2 gets executed while reference macro 1 is still running.
Perhaps I am not understanding the Semaphore unlock still or there is a bug. From the Wiki.
- When the Semaphore is unlocked the next macro instance in the queue will execute in First In First Out (FIFO) order. Since the first Action is a Semaphore Lock , only one macro instance is executed at a time.
Only having a Semaphore unlock stops macro from executing.
Example: I have several macros that have the same actions in them so I put two reference macros in each of them so I don't have to change all of them. It looks something like this.
Run Macro A
Reference Macro 1
Macro A unique action
Reference Macro 2
Run Macro B
Reference Macro 1
Macro B unique action
Reference Macro 2
Run Macro C
Reference Macro 1
Macro C unique action
Reference Macro 2
etc.
Problem is Reference macro 2 runs before Reference Macro 1 has completed. I stuck a Semaphore Unlock at the end of Reference Macro 1 but then Macro A unique action doesn't run and the macro just stops. That doesn't make any sense to me at all. I have spent hours on this and tried this.
Run Macro A
- Semaphore Lock
- Reference Macro 1 - Semaphore Unlock at end
- Macro A unique action
- Reference Macro 2
Unfortunately Reference Macro 2 still runs at the same time as Reference Macro 1.
I tried this just to see what happened and was surprised to find that step 2 never runs because the Unlock stops it from running (seems like a bug or unusual behavior. Perhaps it freaks out and cancels all Macros because it didn't see any semaphore lock running with that name and so it is a hidden function @peternlewis built in.
- Reference Macro 1 - Semaphore Unlock at end
- Macro A unique action
- Reference Macro 2
Anyway, some help on how to get a single macro referencing other macros to run in order and not overlap would be greatly appreciated.
I need someway to tell Reference Macro 2 not to start until Reference Macro 1 has completed and Macro A unique action has completed. I need them to fire after each step has completed instead of Macro A firing all three actions as fast as possible.