auto turn on and off scripts. help please

Josh

New member
hey noob here.
I'd like to know how to make a macro only operational when a chosen app is running . at the moment I have a separate macro that on launch of an app , it turns on the 2nd macro. and a 3rd that when the app is closed it disables the 2nd macro. this feels messy and doesn't work reliably. I've seen that i can add constraints to the macro for it to work and constraints to the trigger. but what i want is the macro to just toggle on and off based on if another app is running in the foreground. ie not have floating buttons on my screen 24/7 and not be constantly enabling and disabling manually. any advice would greatly be appreciated.
 

Abalsam

Active member
hey noob here.
I'd like to know how to make a macro only operational when a chosen app is running . at the moment I have a separate macro that on launch of an app , it turns on the 2nd macro. and a 3rd that when the app is closed it disables the 2nd macro. this feels messy and doesn't work reliably. I've seen that i can add constraints to the macro for it to work and constraints to the trigger. but what i want is the macro to just toggle on and off based on if another app is running in the foreground. ie not have floating buttons on my screen 24/7 and not be constantly enabling and disabling manually. any advice would greatly be appreciated.
A macro is not able to turn itself on. Something has to be running that detects the change in condition turning it on.

With that said, constraints and multiple triggers is probably your best bet.

What is it you want this macro doing inly when this app is in the foreground? If I had more details I might be able to give you a proof of concept...

Thanks
 

RSF

Well-known member
Here's a screenshot showing one way you could use these ideas to turn on and off your macro:
Screenshot_20220303-073012.png

This uses the Calendar app as the trigger, so you'd change that to be whatever app you want to detect.

"Detect Calendar 2" is the app that gets turned on and off (and, if you enable that "Cancel Macro Actions" action, stopped in mid-execution as well as being disabled)
 
Top