Time elapse actions

charlesMG

New member
Hi,

I am trying to create a macro when an application launch (trigger), the home screen will be launched after 1 minute of the application running in the foreground.

I've tried the following but it doesn't seem to work.
  1. Launch App (trigger)
  2. Stopwatch (start) 1 minute (Action)
  3. Launch Home Screen (Action)
Is there another activity that should be used for delayed actions or the way to set it to action something after an app was in the foreground for a set period of time?

Thanks in advance.
 

Dm114

Well-known member
Hi,

I am trying to create a macro when an application launch (trigger), the home screen will be launched after 1 minute of the application running in the foreground.

I've tried the following but it doesn't seem to work.
  1. Launch App (trigger)
  2. Stopwatch (start) 1 minute (Action)
  3. Launch Home Screen (Action)
Is there another activity that should be used for delayed actions or the way to set it to action something after an app was in the foreground for a set period of time?

Thanks in advance.
Try this:

T: Launch App
A: Wait before next action (1 minute)
A: Launch Home screen

May be you would like to add a constraint to check whether App is still running in foreground.
 

charlesMG

New member
Thanks. That worked. Is there no option to select an existing MacroDroid Macro as a trigger? So if the macro ran then that triggers another macro?
 

Dm114

Well-known member
You can use a global variable (boolean, integer or whatever) and launch the other macro when value changes (using value change as a trigger).

Macro1:
T: (triggers)
A: (Macro1 actions)
A: [v:bRan]=true OR [v:iLastTimeRan]=[system_time] (as last action)

Macro2:
T: MacroDroid variable change
A: Reset Trigger variable value
A: ...
 

Dm114

Well-known member
Or do it the other way around and use the Macro Run action - ie macro runs and (then) runs another macro.
You are right but I just discovered this action (probably a new one) thanks to a recent Jamie's answer on another thread. 🙏I was completely wrong: I confused 'Macro run' action (which I use from the very beginning) and 'Wait untill trigger' I never used...
I was completely wrong: I confused 'Macro run' action (which I use from the very beginning) and 'Wait untill trigger' I never used... 🤭
 
Top