Page 1 of 1

Modified timer option

Posted: 25 Aug 2019 19:39
by Lucy
Is it possible to create a shortcut trigger to activate a timer that can be edited for when it runs out the flow then continues to do other actions? Im trying to create a sleep shortcur but i want to be able to manually set the time but without having to edit the flow

Re: Modified timer option

Posted: 26 Aug 2019 18:40
by Desmanto
I don't get exactly what you want. But it seems you want to set a custom timer, then after the timer reach the time, it execute a flow. Kinda like execute flow but with custom delay.

The easiest logic is to replace the time in the sleep with variable. You can then set the variable to any time you want. But this cause unnecessary wakelock, especially when you have sleep longer than 1 minute.

Better use Glovardt (Global Variable Datetime). The variable you can choose is the interval you want to add to current time and save it to glovardt. Create 2 flows, one is with input dialog to choose the interval you want. At the end of the flow, add the interval to current time and save it to glovardt. At another flow, use this glovardt as the trigger, and execute the main branch of your flow.

Re: Modified timer option

Posted: 26 Aug 2019 20:19
by Lucy
Hmm... let me try clarify a little more..
-I want to create a flow to do some actions.
-I want the flow to be triggered by a shortcut.
These parts no issue, but as the first action after triggering the shortcut what i want is to have some sort of dialog appear to where i can then manually set a timer and when that timer depletes the flow continues the rest of the actions.
Is this any clearer?

Re: Modified timer option

Posted: 27 Aug 2019 04:01
by Desmanto
Yes, that means i understood it correctly at first try :)
You can do as above. I have shared a very similar concept flow at here: http://automagic4android.com/forum/view ... f=3&t=7859

Even though it is for toggling state, but you can easily modify it to a execute flow with delay. Simply replace the bottom 4 actions. You don't need any toggling at the left, simply a notification is enough. Replace the right part with your main branch of the flow you want to execute after timeout

Re: Modified timer option

Posted: 27 Aug 2019 07:29
by Lucy
Lol thats close enough i suppose to what i want, thank you.
Been messing around with it and i can definitely make it work to my likings😊... further edit: after a bit of editing its working a treat to what i need🤙