XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 10th, 2025, 6:28 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: August 6th, 2013, 9:02 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
I have saved a number of settings to a preference.ini file and when the preferences are changed I wish to force the widget to reload (when the save button is pressed) so that the widget will restart with all new settings. So, is it possible to force a restart in code? (not from the menu).


Last edited by yereverluvinuncleber on June 28th, 2017, 5:49 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: September 22nd, 2013, 11:06 pm 
Offline
User avatar

Joined: March 8th, 2013, 10:27 pm
Posts: 353
widget.cmd("!Reload");

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
PostPosted: September 23rd, 2013, 11:58 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
Thanks very much, will try and test and report back.


Top
 Profile  
 
PostPosted: November 25th, 2013, 7:19 am 
Offline

Joined: October 26th, 2013, 8:17 am
Posts: 362
digigamer wrote:
widget.cmd("!Reload");


there is not any !Reload command in the Autocomplete List.
Also when i use this command i don't see any effect.

am i doing wrong?
or is there another option?

just to note:
i want to Reload one of widget window from the code


Top
 Profile  
 
PostPosted: October 12th, 2014, 7:06 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
BUMP

This didn't work for me either.

I need a way to reload a widget from the menu. At the moment I am creating a menu option that calls a routine that runs widget.cmd("!Reload");

It does nothing. Does anyone have a method for reloading a widget from code?


Top
 Profile  
 
PostPosted: October 13th, 2014, 1:06 am 
Offline
User avatar

Joined: October 13th, 2014, 1:04 am
Posts: 13
PUSH

I would also like to reload the widget from the press of a button.
Currently it seems to me, when the system is put to sleep, after waking up certain information does not refresh.
eg.: weather information (in general), which can't be fixed by "update weather" alone, the widget has to be refreshed

_________________
-- TheYinas --
on DeviantArt: http://yinas.deviantart.com/


Top
 Profile  
 
PostPosted: October 13th, 2014, 6:53 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Just click everywhere ON the widget and press "F5". Works like the windows refresh.. ;)

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: October 13th, 2014, 8:01 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
That's really useful information Jim. Good to know - we must document that somewhere, I am getting more involved in Xwidget now so will try to help there soon.

I do need to be able to do this in code though. All my previous widget engines have a simple "Reload Widget" which exists to sort out widgets that are malfunctioning through getting confused, communication, thread, memory issues all sorted by a 'reload widget'. I reckon the function might be in there somewhere I just don't know whether or where.


Top
 Profile  
 
PostPosted: October 25th, 2014, 6:38 pm 
Offline

Joined: October 26th, 2013, 8:17 am
Posts: 362
jimking wrote:
Just click everywhere ON the widget and press "F5". Works like the windows refresh.. ;)

i didn't know this...
it hadn't been pointed anywhere,
thanks

=============
yereverluvinuncleber wrote:
I do need to be able to do this in code though. All my previous widget engines have a simple "Reload Widget" which exists to sort out widgets that are malfunctioning through getting confused, communication, thread, memory issues all sorted by a 'reload widget'. I reckon the function might be in there somewhere I just don't know whether or where.

i don't know if the Reload command going to be available in next version or not...


but as a temporary solution:
you can send keyboard input in code by using ActiveX objects,
so you can send F5 to your widget through code:

example:
Code:
wsc=new ActiveXObject("WScript.Shell")
widget.ForceToFround()
wsc.SendKeys("{f5}")

Comment:
1. 1st line will create activex object
2. 2nd line will make the widget to TopMost and Set Focus to it
3. 3rd line will send F5 key


Note:
make sure you set the focus to your widget before sending key to it (as i have done it in 2nd line),
to prevent sending key incorrectly to other programs


Top
 Profile  
 
PostPosted: October 25th, 2014, 8:30 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268
Thank you hamid and jimking great to know :mrgreen:


Top
 Profile  
 
PostPosted: October 26th, 2014, 4:33 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
Thanks for the input everyone.

I have a workaround

Reopening the post as a bug so it can be added to the list.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group