Customise Toggle Widget
Moderator: Martin
Customise Toggle Widget
I use a toggle widget that is doing exactly what I want but would like to change it's fill colour. Is this possible?
Re: Customise Toggle Widget
Hi,
Sorry, toggle widgets can not be customized.
You could create your own widget (menu->Custom Widgets) and add a clickable action to execute a flow (expand section Clickable Actions and add an action Execute Flows to execute a flow of your choice).
You can also modify the look of your widget with a script function setWidgetElementProperty (use the button Function in action Script to insert the function call since it will display a dialog to compose the function call).
Regards,
Martin
Sorry, toggle widgets can not be customized.
You could create your own widget (menu->Custom Widgets) and add a clickable action to execute a flow (expand section Clickable Actions and add an action Execute Flows to execute a flow of your choice).
You can also modify the look of your widget with a script function setWidgetElementProperty (use the button Function in action Script to insert the function call since it will display a dialog to compose the function call).
Regards,
Martin
Re: Customise Toggle Widget
Thanks for the quick reply.
The toggle works so well. Turning the toggle on acts as its own trigger, the flow commences, it is conditionally tested then one of two paths are executed. The two paths effectively switch the phone between two states; I'm now in my car so set these things on and these other things off, or I'm not in my car, swap everything back again.
If I do it with a custom widget I have to 'code' the moving of the global variable between states. I'd have to test the current state of the global variable, flip it to the opposite and then execute the appropriate flow. Not a big issue it's just that the toggle widget is so elegant. I also like the green-on status indicator in the widget. As you say, using setWidgetElementProperty would probably do that as well but I haven't looked yet.
I know, I'm just being lazy.
Cheers, Andy.
PS - loving Automagic. Just new to smartphones and initially tried Llama but there was too much cell tower confusion to get Llama working reliably. Automagic is just wonderful.
EDIT. Just did the changes using your suggestions to use script/setWidgetElementProperty . Didn't take that long and works well. Thanks.
The toggle works so well. Turning the toggle on acts as its own trigger, the flow commences, it is conditionally tested then one of two paths are executed. The two paths effectively switch the phone between two states; I'm now in my car so set these things on and these other things off, or I'm not in my car, swap everything back again.
If I do it with a custom widget I have to 'code' the moving of the global variable between states. I'd have to test the current state of the global variable, flip it to the opposite and then execute the appropriate flow. Not a big issue it's just that the toggle widget is so elegant. I also like the green-on status indicator in the widget. As you say, using setWidgetElementProperty would probably do that as well but I haven't looked yet.
I know, I'm just being lazy.
Cheers, Andy.
PS - loving Automagic. Just new to smartphones and initially tried Llama but there was too much cell tower confusion to get Llama working reliably. Automagic is just wonderful.
EDIT. Just did the changes using your suggestions to use script/setWidgetElementProperty . Didn't take that long and works well. Thanks.
Re: Customise Toggle Widget
Can anyone give me a link to go check how to use toggles and scripts? Want to start creating some, some 3xamples could be very helpful to start.
Thanks
Thanks