XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Sep 23日 20:58

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2017年 Sep 3日 06:55 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 556
I have noticed the network cores seem to hibernate when Windows is paused and fails to restart when the system awakes from sleep. I have to press F5 to restart a network widget that contains one of the network cores.

This is under Windows 7 ultimate 64bit. If you have noticed the same problem under Windows please let me know.

I have added the following code:

Code:
//variables and objects for waking the widget from sleep
var time = new Date();
var savedTime = time;
wsc=new ActiveXObject("WScript.Shell");
.
.
.
// timer to check sleep once a minute
// sets a value, check the value and if the difference is
// greater than three minutes then assume the PC has been
// asleep and restart the widget.
//==============================
// reload after sleep
//==============================
function sleepTimerOnUpdate(Sender)
{
    var theDate = new Date();
    var secsDif = parseInt(theDate.getTime() / 1000, 10) - parseInt((savedTime) / 1000, 10);

    if (secsDif >= 60) {      // 1 mins pause causes a restart
        if (debugFlg == 1) {print("Running the sleep timer - the difference is an abnormal " + secsDif + " secs");};
        //alert("Running the sleep timer - the difference is an abnormal " + secsDif + " secs");

        savedTime = new Date();
        sleepTimer.enabled = false;
        widget.ForceToFround();
        wsc.SendKeys("{f5}");

    } else {
        savedTime = new Date();
    }
}
//=====================
//End function
//=====================


In addition I have added a timer called sleepTimer that is set OnUpdate to call the above routine, sleepTimerOnUpdate.

I have added this code to cause the widget to auto restart when the system awakes from sleep. This appears to fix the problem restarting the widget and allowing it to function as expected.

Note: If this affects my widgets then you should expect that it will affect any of your own widgets that contain the network cores.


Top
 Profile  
 
PostPosted: 2017年 Sep 4日 01:08 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 556
Jim, will you please test this and if you have the same issue then add it to the bug list.


Top
 Profile  
 
PostPosted: 2017年 Sep 4日 01:37 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4545
I use my other laptop with win8.1 this period, so I will test there as soon as possible..

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


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

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 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:  
cron

Powered by phpBB® Forum Software © phpBB Group