Hi all, new to automatic (AM), I come from macrodroid (MD).
AM is much more reliable than MD, so I'm considering moving to AM.
But I need to get used to AM programming and there are still so many doubts!
The 1st one is conditional branching. Back in MD I could use WHILE REPEAT and IF THEN ELSE conditions, and these don't seem to be there in AM (to be fair, I discovered AM yesterday).
Here is an example : trigger is incoming call, and I want to toggle on and off the flashlight while the phone is ringing. I can choose every action, but how do i set a loop to toggle the flashlight until I answer the phone?
Besides that there are other problems, but one at the time! And congrats to AM developers, it's a great utility.
Conditional branching
Moderator: Martin
Re: Conditional branching
Just to clarify : I want to toggle the torch on and off every 500 Ms, while the phone is ringing only.
Re: Conditional branching
Hi,
You can add branches to a flow by adding a condition to a flow and then connect the true/false-branches to different actions. You can find an example here: Flow list, open the Menu: Catalog->Location Based WiFi On/Off.
You can also build loops by using a condition. Check out example Countdown from the catalog.
Regards,
Martin
You can add branches to a flow by adding a condition to a flow and then connect the true/false-branches to different actions. You can find an example here: Flow list, open the Menu: Catalog->Location Based WiFi On/Off.
You can also build loops by using a condition. Check out example Countdown from the catalog.
Regards,
Martin
Re: Conditional branching
Hi
Simply download all flows in forum. Study them. You can easily learn more quickly.this is the flow which is required to you. Any doubts?
Post.
Simply download all flows in forum. Study them. You can easily learn more quickly.this is the flow which is required to you. Any doubts?
Post.
- Attachments
-
- flash light when ringing.xml
- (3.45 KiB) Downloaded 700 times
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
Re: Conditional branching
Welcome on board. You can loop the element by dragging back the element back to its previous one. In this case you want to loop the flash light on - sleep - flash light off - sleep >> loopback to flashlight on. But you want to check in middle, whether the phone is still ringing. So add condition Call State : Ringing.
There is similar concept here : viewtopic.php?f=5&t=7573&p=22143&hilit= ... ent#p22143
Except, replace the speech output with the flash light on/off loop (4 elements)
There is similar concept here : viewtopic.php?f=5&t=7573&p=22143&hilit= ... ent#p22143
Except, replace the speech output with the flash light on/off loop (4 elements)
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Conditional branching
I'm confused and amazed at the same time.
Thanks for your help!
Sure I will try most of the flows, I need to learn Automagic idiosyncrasies
Thanks for your help!
Sure I will try most of the flows, I need to learn Automagic idiosyncrasies