Attaching scripts to widgets

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
Maxxy
Posts: 6
Joined: 23 Aug 2014 10:17

Attaching scripts to widgets

Post by Maxxy » 23 Aug 2014 10:26

For example I have a flow that covers stupid battery icon with a widget overflow of a battery percentage, that is far more useful than a filling up battery picture. That place is pretty crowded and the percentage should be as big as possible. So if percentage changes to 100 I can't see full 100 (since its more than 2 digits). A cut off 1 and a cut off last zero is what I see. It would be cool if for example I could say: when certain variable is eaqual to certain value then change text width... Or maybe change text to a green battery image. So im talking about adding script flexability to all of the parts of the custom widgets.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Attaching scripts to widgets

Post by Martin » 23 Aug 2014 15:12

A custom widget can be modified using the script function setWidgetElementProperty from within a flow.

The custom widget tutorial mentions this capability at the bottom of the page in the section Tips:
Creating a Custom Widget

Locked