refresh widget

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

Moderator: Martin

Locked
kamil_w
Posts: 50
Joined: 22 Oct 2013 19:01

refresh widget

Post by kamil_w » 20 Nov 2014 17:14

I wanted to make a widget "a card from calendar" which will show date, year and name of day.
I wanted to add such flow:
When time is 00:00:01 and widget haa not been refresh today - refresh it.

So is there such action hidden somewhere? If not, would be cool to find it implemented in one of the future versions of Automagic.

User avatar
AMChris
Posts: 42
Joined: 22 Oct 2014 08:39

Re: refresh widget

Post by AMChris » 20 Nov 2014 18:34

hi
What about using a "Time" trigger and just refresh it every day at 00:01 regardless whether it has already been refreshed?

kamil_w
Posts: 50
Joined: 22 Oct 2013 19:01

Re: refresh widget

Post by kamil_w » 20 Nov 2014 19:00

Main problem is that there is no action "refresh widget" or just I can't find it.

User avatar
AMChris
Posts: 42
Joined: 22 Oct 2014 08:39

Re: refresh widget

Post by AMChris » 20 Nov 2014 19:17

Automagic only refreshes a widget when it detects either a change in a global variable that is used by the widget or when a property of a widget element is modified.
So you can use a script action and a "Object setWidgetElementProperty(String widgetName, String elementName, String property, Object value)" function to trigger a refresh.

psydex
Posts: 11
Joined: 19 Jun 2015 07:46

Re: refresh widget

Post by psydex » 19 Jun 2015 08:07

me too.
I want to refresh widgets by separated action, not by setWidgetElementProperty, because all expressions on widget becomes broken after setWidgetElementProperty

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

Re: refresh widget

Post by Martin » 19 Jun 2015 09:06

There's a new script function refreshWidget available in the latest version of Automagic.

Regards,
Martin

Locked