Page 1 of 1
Call count
Posted: 26 Sep 2019 01:05
by Lucy
Ok hunny.. what about this one.
I was wanting to make a flow so that if a certain contact calls me X amount of times within X minutes it would trigger other actions. How would i go about doing such a task?
P.s. thanks sweetie for all your previous help.
Re: Call count
Posted: 27 Sep 2019 18:20
by Desmanto
It can be done easily by using condition execution count with timed option.
Use trigger incoming call - ringing, filter for the contact/number you want. Then add condition execution count, let say 5 times in 5 minutes.
False do nothing, true go to the action you want.
When the contact call, flow triggered and stop at the execution count. The counter is now 1. Second call within the 5 minutes will increase the counter again.
If there are five calls within 5 minutes, then condition evaluated to true and proceed to the main branch of the action.
If not, the last 5 minutes counter will be cleared out until counter become 0 again.
Re: Call count
Posted: 27 Sep 2019 21:17
by Lucy
Ahh that seems fairly straightforward thank you. Is there a tutorial for expressions that you could pount me to so i can learn how to use them?
Also... if i were to give you a flow ive created and constantly edited, would you be gracious enough to see how i could go about cleaning it up? I would also of course provide necessary information for what i am trying to achieve!?
Re: Call count
Posted: 28 Sep 2019 19:03
by Desmanto
Expression is the same as the script, it is all inside the documentation :
https://automagic4android.com/action_script_en.html
However adapting to use it in individual style is all up the each.
I can help you to clean up and edit the flow. But most of the time, it is very difficult for most of us to understand each other scripting/flow editing style. I have to learn your flow, edited it. Then you need to learn my edited flow and remodify again to suit your need. I generally put most of the important script into a single script and put blocks/indentation. But others might split it up to several smaller script. So it is better to tell what you want to achieve, I will show you how to achieve that (or maybe part of the script) and you can modify them to suit your style. I think that's also the best way to improve the scripting skill, with trial and error. And when stuck, ask the forum.
There is maybe a good practice of scripting, such as always give indent to new sub block, create new line for each long list, use parallel expression, etc. But If I force my scripting style to anyone, most will be annoyed or maybe have difficulty to read it and ended up not using it at all. That's why I usually don't share my flow, aside from the reason that most flows are for specific purpose. But sometimes to demonstrate some concept, I can pack it up and put some notes and then share the flow.