New Action "Exit Macro"

Quidn

Passionate Member


● Similar Actions​


  • "Cancel Macro Actions" also affects to every other runnings(macro instances) and cancels all futher actions of all instances.

  • "Exit Action Block" exists in action blocks only just as its name and no similar action in macros.
    - Same function as this, but for macros, not action blocks.

  • "Quit macro on back pressed" and "Cancel after timeout" options in "If Confirmed Then" action do "Exit", but these are intended to exit when user interaction was made or not made until timeout.
    - Same function as this, but immediate execution, without waiting or interaction.




● Why this is needed?​


This can do early exit or return without complicatedly nested if/else clauses.




● Current alternative​


Repeat Actions by fixed(1) number, and do "Break From Loop".
But this moves all actions into as children of loop block, so not practical in most cases.



 

03b

New member

Current alternative​


Repeat Actions by fixed(1) number, and do "Break From Loop".
But this moves all actions into as children of loop block, so not practical in most cases.

I am facing the same problem. But I want to mention this alternative does not help me. I have a loop within a loop. From the child loop, I need a way to break out from the parent loop. I cannot. Because breaking out of child loop just goes back into parent loop, which then goes into the child loop again.

If I make special variables to keep track if the loop should continue or break, it also does not help. Because when the macro is running multiple instances, the variable is updated in all instances and some instances which must continue looping will break out incorrectly.

There is only 2 solutions here.

Solution number 1:
Option to Cancel Macro Actions for only current instance.

Solution #2
Break from loop (with number). Example Break from Loop (2), breaks the parent loop of current loop.

If you have 3 loops nested.
Loop 1
•Loop 2
••Loop 3

If I'm in loop 3, doing a break from loop takes me back to loop 2. If I need to break out of loop 1 from within loop 3, I need Break from loop (with option #3), which will break 3 times to get me out of loop 1.

Personally, solution 1 is easy and less messy. I'm surprised it is not already possible, as it should be very useful.

This is s big issue for Me because macros are becoming a mess of if/else and I see no way to reliably exit a current running instance without affecting other running instances
 
Top