JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #341  
Old 22.02.2018, 00:31
Taobaibai
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by mgpai View Post
Extraction Scheduler
Code:
// Schedule Extraction
// Trigger Required: Interval
// Disable Auto Extract in Archive Extractor
// Forum Topic: https://board.jdownloader.org/showthread.php?t=70655

var t = [21, 30]; //Set Starting Time [hours,minutes] e.g. [21,30] is 9:30 PM

if ((new Date().setHours(t[0], t[1], 0, 0) % new Date() < interval)) {
    var links = getAllDownloadLinks();

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var autoExtract = link.getArchive().getInfo().autoExtract;

        if (link.isFinished() && link.getArchive() && link.getExtractionStatus() == null && autoExtract != "FALSE") {
            callAPI("extraction", "startExtractionNow", [link.getUUID()], []);
        }
    }
}



Doesn't work for me? Is there an update?
Reply With Quote
  #342  
Old 22.02.2018, 10:22
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

@Taobaibai: Did you make sure to use the correct trigger?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #343  
Old 22.02.2018, 11:25
Taobaibai
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
@Taobaibai: Did you make sure to use the correct trigger?
this one?

Quote:
Trigger Required: Interval
Reply With Quote
  #344  
Old 22.02.2018, 11:29
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

Yes, and what exactly doesn't work for you?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #345  
Old 22.02.2018, 11:30
Taobaibai
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
Yes, and what exactly doesn't work for you?
it extracts while downloading. I just want to finish all my downloads before extracting.
Reply With Quote
  #346  
Old 22.02.2018, 11:34
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

Did you disable autoextraction, see
#Disable Auto Extract in Archive Extractor
Also note that links in list must be changed manually first. Select them and rightclick context menu and disable extraction.
Changing default value will only affect new added links
__________________
JD-Dev & Server-Admin
Reply With Quote
  #347  
Old 22.02.2018, 12:06
Taobaibai
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
Did you disable autoextraction, see
#Disable Auto Extract in Archive Extractor
Also note that links in list must be changed manually first. Select them and rightclick context menu and disable extraction.
Changing default value will only affect new added links

No, it is enabled,

so all new Links will be extracted after finishing downloading?
Reply With Quote
  #348  
Old 22.02.2018, 12:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

I didn't test that script myself but that's what it should do.
Important is that this only works when links in list are set to auto extraction disabled. Default Auto-Extract only affects new added links
__________________
JD-Dev & Server-Admin
Reply With Quote
  #349  
Old 22.02.2018, 14:18
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default

Quote:
Originally Posted by Taobaibai View Post
Doesn't work for me? Is there an update?
To extract archives at scheduled time (Runs only once a day. Does not wait for all download to finish), use the old (rewritten) script:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Taobaibai.js

Quote:
Originally Posted by Taobaibai View Post
it extracts while downloading. I just want to finish all my downloads before extracting.
To extract archives only after all downloads have finished, use this new script:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Taobaibai_2.js

If you want the links which are currently on your list to be extracted by the script, make sure that 'auto extraction' has been disabled for those links. You can select those links and view/change their extraction settings using "Archive(s)" sub menu in the context menu or "Package/Link Properties Panel" in the bottom tool bar.
Reply With Quote
  #350  
Old 22.02.2018, 16:32
netgearjd netgearjd is offline
Giga Loader
 
Join Date: Aug 2014
Posts: 92
Default

Quote:
Originally Posted by mgpai View Post
Script Created:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/netgearjd_2.js
Script updated:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/netgearjd.js
Fantastic; thanks yet again.

Quote:
Originally Posted by Jiaz View Post
@netgearjd
getComment and setComment
Cheers, seemed obvious but thought it's best to confirm.

Quote:
Originally Posted by mgpai View Post
Code:
docs.google.com/document/d/1IGeAwg8bQyaCTeTl_WyjLyBPh4NBOayO0_MAmvP5Mu4
Quote:
Originally Posted by Jiaz View Post
Better api list
Code:
my.jdownloader.org/developers/
How up to date are these? I'm only asking because for example getComment and setComment seem to be missing from both, so I wonder what else might not have been added yet...
Reply With Quote
  #351  
Old 22.02.2018, 16:37
Taobaibai
Guest
 
Posts: n/a
Default

To extract archives only after all downloads have finished, use this new script:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Taobaibai_2.js


Thank you, that was what I was looking for!!!!
Reply With Quote
  #352  
Old 22.02.2018, 16:48
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

@netgearjd: we update the static version from time to time. You can always fetch the live one from your own JDownloader. Enable Settings-Advanced Settings-RemoteAPI.deprecatedapienabled and visit localhost:3128/help
You should disable this if not required.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #353  
Old 22.02.2018, 17:25
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,528
Default

Quote:
Originally Posted by netgearjd View Post
... getComment and setComment seem to be missing from both ...
Event scripter methods will not be listed in those documents. You can find them in the the script editor help menu. All methods will appear in the built-in list, as and when they are made available by the developers.
Reply With Quote
  #354  
Old 22.02.2018, 18:35
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

@netgearjd: sorry, mixed up api with eventscripter
@mgpai: thanks
__________________
JD-Dev & Server-Admin
Reply With Quote
  #355  
Old 26.02.2018, 01:11
netgearjd netgearjd is offline
Giga Loader
 
Join Date: Aug 2014
Posts: 92
Thumbs up

Quote:
Originally Posted by mgpai View Post
Event scripter methods will not be listed in those documents. You can find them in the the script editor help menu. All methods will appear in the built-in list, as and when they are made available by the developers.
Good to know, thanks!
Reply With Quote
  #356  
Old 02.03.2018, 06:33
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 29
Default

Hello, can someone help me to create a simple script, I need to replace the "clearList" script by a script who does the "Start All Downloads" function (see the image). I need to force linkgrabber to send links to downloads (when autoconfirm does not work). I tested several scripts from the documentation, but without success.

I use the "clearList" a long time, because after the jdownloader stays open on for a long time the "autoconfirm" stops working, being necessary to clear the list and start over.

Reply With Quote
  #357  
Old 02.03.2018, 10:21
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

@patrik: what exactly doesnt work about *autoconfirm* ? You know about the timeout of it ? maybe auto confirm works but there is a confirmation dialog about offline/incomplete archives and without answering this dialog, nothing will happen.
You can check Settings-Advanced Settings-confirm
__________________
JD-Dev & Server-Admin
Reply With Quote
  #358  
Old 02.03.2018, 10:52
dxzdxz1 dxzdxz1 is offline
Super Loader
 
Join Date: Nov 2017
Posts: 26
Default

I'm trying to create a script that does the follow actions:


On a batch download, after each download and extraction finishes I would like to run this command:

compact.exe /c /exe:lzx *

for every new downloaded file

I have tried to do with this

Code:
var compact = "compact.exe";
var file = "archive(getExtractedFilePaths).getExtension()"; {
    callAsync(function() {}, compact, "/c", "/exe:lzx", file);
}
But is not working

Where the script is wrong and how can I fix it?
Reply With Quote
  #359  
Old 02.03.2018, 11:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,232
Default

@dxzdxz1: syntax and usage looks very wrong.
file is a string "archive(getExtractedFilePaths).getExtension()"?
I guess you want the compact.exe called for every file or on the extraction folder?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #360  
Old 02.03.2018, 11:17
dxzdxz1 dxzdxz1 is offline
Super Loader
 
Join Date: Nov 2017
Posts: 26
Default

Quote:
Originally Posted by Jiaz View Post
@dxzdxz1: syntax and usage looks very wrong.
file is a string "archive(getExtractedFilePaths).getExtension()"?
I guess you want the compact.exe called for every file or on the extraction folder?

Exactly. I want to run compact for every file on the extraction folder.

Compact is a built in Windows 10 tool to transparent compression (similar to that old NTFS compression).
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 05:08.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.