List of running macros, or else, check for already existing macro instances

Alex Heil

New member
Hi there! First of all, thanks for providing macrodroid.

Now, I come every time to the problem that I would need to be sure if a macro is already running or if one instance has been yet started or a way to reasonably "restart" it.
Sure, I use any method to track running macros by setting global variables, or checking existence of massages.
But, this all seem to be made easier, if one could get status of running macro instances.
It must be an easy task to provide info on actually active macros.

This feature would make macrodroid a lot more reliable, helping to avoid confusion on triggers or on general status of targets reach.

Once there is time, this could be a good thing to work on!

Many thanks on advance!

Alex Heil
 

Jenyaza01

New member
If you can start macro more then once - you can use local variable like isRunning, set to true when that macro starts and enters loop, or wharever, set variable to false when macro ends, and if it starts but variable is already true - then skip all other actions, so double-started macro won`t do anything.

local bool isRunning = false

if (not isRunning)
{
isRunning = true
do_all_your_stuff
isRunning = false
}
 

Alex Heil

New member
Hello @Jenyaza01,
I don't think this is a great idea.
Did it yet. Now, if the macro gets aborted anyhow, It will never be started again, if you don't reset your variable...
I in fact don't see a problem to provide a log of running instances.
It would be helpful for lots of users.

Once you have lots of macros ready to be triggered by different circumstances, it would be a very useful way of monitoring and debuging everything.
 

tanutanu

Well-known member
Same macros always run sequentially. So you don't need to care a macro running on the same time.
When previously executed instance has a break on a wait action statement, it is canceled and next one starts.

A, B and more different macros could be running parallelly but easy to check Jenyaza01's approach. Each macros is always unique, doesn't duplicated like A1, A2, B1, B2 B3 and C.
If you don't want to execute very frequently, you can use constraint to avoid that.
 
Top