View Single Post
  #2503  
Old 06.12.2022, 23:40
nano27 nano27 is offline
Baby Loader
 
Join Date: Dec 2022
Posts: 6
Default

Quote:
Originally Posted by mgpai View Post
Code:
/*
    Random delay before download
    Trigger : A Download Started
    IMPORTANT : Enable "Synchronous execution" checkbox in the top panel
*/

var seconds = Math.floor(Math.random() * 5) + 1 // 1 to 5 seconds

while (seconds && !link.aborting) {
    sleep(seconds * 1000);
    seconds--;
}
Dear mgpai,
I got this error when running this script:

ReferenceError: "link" is not defined. (#9)

EDIT: Another thing I wanted to ask you is if I can separately combine the scripts: Randomize download order (https://board.jdownloader.org/showth...967#post492967) and Random delay before download, or should they both be in the same script?

Last edited by nano27; 07.12.2022 at 00:47.
Reply With Quote