View Single Post
  #1375  
Old 18.05.2020, 14:19
MrBojangles_ MrBojangles_ is offline
Junior Loader
 
Join Date: May 2020
Posts: 13
Default

Quote:
What is the status of the link after you have the script has finished running? Is it "OFFLINE" or "UNKNOWN"? You can try resetting the link after running the external program.
So all the links start as UNKNOWN because checking the links counts against the download limit (approx 75 between captchas).

Before the script runs, the download that failed (/triggered the captcha) is OFFLINE. After the link resets then it goes back to UNKNOWN. Putting it after running the external program doesn't seem to change anything, except resetting the link later. The downloads still don't restart

Does startDownloads() not do anything if the links are UNKNOWN?

Quote:
Code:
var myObject = setProperty(myString/*"key"*/, myObject/*anyValue*/, myBoolean/*global(boolean)*/);/*Set a Property. This property will be available until JD-exit or a script overwrites it. if global is true, the property will be available for al scripts*/
/* Example: */var oldValue=setProperty("myobject", { "name": true}, false);

var myObject = getProperty(myString/*"key"*/, myBoolean/*global(boolean)*/);/*Get a Property. Set global to true if you want to access a global property*/
/* Example: */var value=getProperty("myobject", false);
Great that's exactly what I was looking for, thank you!

Quote:
use this to get the actual link status, you might also want to look into isSkipped();. instead of reset(); try resume();
The way I'm extracting link status seems to be working ok, and resetting it works too. But it's just restarting downloads within the script that I'm having trouble with.

Quote:
not sure what you want to do with the time interval check. afaik jd eventscriptr is single instance script. every global variables are reset after script exited/completed. there is a workaround by save it out to txt file then read back at later time. scroll back to a few post sjust above for example. make sure text file name is unique by using the file name e.g link.getName(); again dont know what callSync("c:\\test.exe"); will give you but getStatus(); isSkipped(); & resume(); are all you might need
Mgpai's method seems to indicate I can save variables that I can retrieve in later instances. BUT if there's no way to read system time from within the script I can use Snaz to output time to a text file and then read from that, so that's a great backup plan - thanks!

Last edited by MrBojangles_; 18.05.2020 at 14:22. Reason: Answered one of my own questions...
Reply With Quote