View Single Post
  #20  
Old 07.06.2019, 18:42
pbm2
Guest
 
Posts: n/a
Default

I made 2 scripts, but not sure which is the better one. Does && in Jdownloader means the same as && in cmd? (execute second command only if the first was successfull)? Or is && the same as & in JDownloader? I didn't noticed a difference using && or &

Code:
if (isDownloadControllerIdle() && !callAPI("extraction", "getQueue").length && !callAPI("linkcrawler", "isCrawling")) && callAsync(null, "cmd", "/c %windir%\\sysnative\\qprocess|findstr \"process1.exe process2.exe\"||shutdown -s -f")

Code:
if (isDownloadControllerIdle()) {
    if (!callAPI("extraction", "getQueue").length) {
        if (!callAPI("linkcrawler", "isCrawling")) {
            callAsync(null, "cmd", "/c %windir%\\sysnative\\qprocess|findstr \"process1.exe process2.exe\"||shutdown -s -f")
        }
    }
}
Reply With Quote