Page 1 of 1
					
				refresh widget
				Posted: 20 Nov 2014 17:14
				by kamil_w
				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.
			 
			
					
				Re: refresh widget
				Posted: 20 Nov 2014 18:34
				by AMChris
				hi
What about using a "Time" trigger and just refresh it every day at 00:01 regardless whether it has already been refreshed?
			 
			
					
				Re: refresh widget
				Posted: 20 Nov 2014 19:00
				by kamil_w
				Main problem is that there is no action "refresh widget" or just I can't find it.
			 
			
					
				Re: refresh widget
				Posted: 20 Nov 2014 19:17
				by AMChris
				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.
 
			
					
				Re: refresh widget
				Posted: 19 Jun 2015 08:07
				by psydex
				me too.
I want to refresh widgets by separated action, not by setWidgetElementProperty, because all expressions on widget becomes broken after setWidgetElementProperty
			 
			
					
				Re: refresh widget
				Posted: 19 Jun 2015 09:06
				by Martin
				There's a new script function refreshWidget available in the latest version of Automagic.
Regards,
Martin