Help- How to set up a counter

agkbos42

New member
I want to make a macro that will turn ringer on in case the phone is on silent after a certaint number of missed calls/texts, preferably after 3. How do i go about this, what would it look like?
 

hsurB

Well-known member
You could try using notification received trigger.
Set variable action - integer variable +1.

And another trigger - variable change - integer variable that we used earlier - change = 3.
Actions for this trigger: volume change and set variable - the same integer variable used earlier - 0

Since you probably don't get any other notifications from apps - messages and contacts, you can probably simply choose these two in trigger notification received and choose 'any' as they don't have to contain any specific phrase.
Note that in volume change action I set everything - 100%, modify that based on your needs.
I am not sure if its needed but before volume change you might want to add action called silent - vibrate off (disable)
 

Attachments

  • MissedCallsAndTexts.macro
    5.5 KB · Views: 4
  • MissedCallsAndTexts.png
    MissedCallsAndTexts.png
    253.8 KB · Views: 12
Last edited:

Dm114

Well-known member
You could try using notification received trigger.
Set variable action - integer variable +1.

And another trigger - variable change - integer variable that we used earlier - change = 3.
Actions for this trigger: volume change and set variable - the same integer variable used earlier - 0

Since you probably don't get any other notifications from apps - messages and contacts, you can probably simply choose these two in trigger notification received and choose 'any' as they don't have to contain any specific phrase.
Note that in volume change action I set everything - 100%, modify that based on your needs.
I am not sure if its needed but before volume change you might want to add action called silent - vibrate off (disable)
I would add Call Missed trigger to take into account missed calls.

I wouldn't use Variable Change as a trigger because it will fire inside the macro itself when adding +1. I'd rather test first the value of the counter and, depending on its value, run the rest of the macro...
 

hsurB

Well-known member
I would add Call Missed trigger to take into account missed calls.

I wouldn't use Variable Change as a trigger because it will fire inside the macro itself when adding +1. I'd rather test first the value of the counter and, depending on its value, run the rest of the macro...

Yeah I guess it will trigger when theres 3rd call coming. Then you either need to add specific phrase to notification or use missed call trigger as you said. Is there other reason that I don't see why wouldn't we should use variable change inside the macro as I did?
 

Dm114

Well-known member
Yeah I guess it will trigger when theres 3rd call coming. Then you either need to add specific phrase to notification or use missed call trigger as you said. Is there other reason that I don't see why wouldn't we should use variable change inside the macro as I did?
The only reason I see why I would avoid to trigger a macro by itself is to prevent a possible mess up while running the same macro twice at the same time...
 
Top