Changing a icon after a macro has been triggered

Snurre

Well-known member
Yes I've ended up with a bit of a collection of macro buttons on the home screen and I agree Kustom is probably the way forward. But I couldn't figure out how to 'toggle' the icons as per macrodroid
I am using this for a WiFi button
First make the macro
Screenshot_20211019-171850_MacroDroid.jpg
Next I made two other macro's to change the icon, I could have done it with just the one, but I choose to do it this way because if another macro, app or something enables/disables WiFi it will change the icon as well
Screenshot_20211019-171908_MacroDroid.jpgScreenshot_20211019-172018_MacroDroid.jpg
Screenshot_20211019-171956_MacroDroid.jpgScreenshot_20211019-172037_MacroDroid.jpg
I choosed to fade the icon when off and 'light up' when on but you can also pick a totally different icon
I'm also using this approach on Bluetooth, Fastcharge, Adb WiFi, Airplanemode and connect to my car
Hope this can help you
 

Dm114

Well-known member
I am using this for a WiFi button
First make the macro
View attachment 1300
Next I made two other macro's to change the icon, I could have done it with just the one, but I choose to do it this way because if another macro, app or something enables/disables WiFi it will change the icon as well
View attachment 1301View attachment 1302
View attachment 1303View attachment 1304
I choosed to fade the icon when off and 'light up' when on but you can also pick a totally different icon
I'm also using this approach on Bluetooth, Fastcharge, Adb WiFi, Airplanemode and connect to my car
Hope this can help you
As your macros are very short, you could gather them 3 in 1 with the 3 different triggers and then test which trigger fired and apply appropriate actions.

I think it'll a bit easier to maintain if you happen to have a lot of macros: this one will be the one to deal with WiFi, another one for Bluetooth and so on, for instance...
 

Snurre

Well-known member
Ok, I think I see your point
Is it something like this you mean:
Screenshot_20211023-124352_MacroDroid.jpg
I just tryed it a couple of times and it seems to work 👍
 

Dm114

Well-known member
Yeah, I'm just a beginner but it makes sence
I will try that 😉
Using 'Else if' action, your macro(s) will run faster because MD won't have to test every 'If' statement and will stop testing conditions as soon as the appropriate one is found.
 

peterinhawk

New member
Another way to write it in a more "elegant" manner could be:
If rotaz=1 do all actions according to this value
Else if rotaz=2 do all actions according to this value
Else rotaz=0 + do all actions according to this value
Endif
Thanks I think I'm getting the hang of this. However I can set up a fairly simple IF ENDIF macro but I can't find the 'ELSE' action to insert after the first 'IF'? There doesn't seem to be an 'ELSE' action in the menu? Can you point me? Thanks.
 

peterinhawk

New member
Another way to write it in a more "elegant" manner could be:
If rotaz=1 do all actions according to this value
Else if rotaz=2 do all actions according to this value
Else rotaz=0 + do all actions according to this value
Endif
Thanks I've got this working and 'toggling' through the volume change which is great. Throws a whole new light on the Macrodroid functionality.
 
Top