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.