View Single Post
  #1379  
Old 19.05.2020, 14:08
MrBojangles_ MrBojangles_ is offline
Junior Loader
 
Join Date: May 2020
Posts: 13
Default

Quote:
Originally Posted by mgpai View Post
You can. You have to make sure the download controller has stopped, before you start it again. In your script, try adding the following after stopDownloads():

Code:
while (!isDownloadControllerIdle()) sleep(1000);

Should work, assuming some other link/script will not try to start the download in the meanwhile.
Ahhh the issue was that the script was set to synchronous. As soon as I switched that off everything worked as expected.

It did create a new problem with the script being triggered repeatedly before the first iteration stopped downloads but I figured a way round that.

Quote:
Originally Posted by mgpai View Post

var myObject = setProperty(myString*"key"*//, myObject/*anyValue*/, myBoolean/*global(boolean)*/);

"key" should be "String"

Code:
if (getProperty("FirstTime", true) === null) {
    setProperty("FirstTime", {
        "stamp": Date.now()
    }, true);
}

var RetrievedTimeStamp = getProperty("FirstTime", true);
alert(RetrievedTimeStamp.stamp);
That fixed it!

Everything is now working beautifully, thank you so much for your help!
Reply With Quote