#221
|
||||
|
||||
![]()
Don't worry, my script is ready with interval trigger and the algorithm you pointed. Just waiting next core update to deeply test it with getFinishedDate().
|
#222
|
||||
|
||||
![]()
Update got released yesterday
__________________
JD-Dev & Server-Admin |
#223
|
||||
|
||||
![]()
Well package.isFinished() returns true even if there are disable links whereas link.isFinished() returns false for disable links. There is some inconsistency for me. package.isFinished() should return false if it contains unfinished links, disabled or not. This is how the isFinished term is intuitively understood by the script programmer.
|
#224
|
||||
|
||||
![]()
For links the internal state is checked. But for packages only enabled links are checked. For example via packagizer/manual disabled mirror links in case they are needed later. In that case package would never finish.
__________________
JD-Dev & Server-Admin |
#225
|
||||
|
||||
![]()
Hey,
What about creating a introducing post in this thread that would only contains:
This thread growing up, it contains now more help, requests and support, etc. than actually scripts. I supposed this thread must be currently overwhelming for new comers that want list of available scripts. |
#226
|
||||
|
||||
![]()
Good idea
![]() @mgpai @fred_gaou Help is welcome ![]()
__________________
JD-Dev & Server-Admin |
#227
|
||||
|
||||
![]()
Could we hope to have ES6 features in our JS script?
Controlling variable scope is so much easier and cleaner with it as just an example. |
#228
|
||||
|
||||
![]()
@fred_gaou: I don't think so. The used javascript interpreter does only support very limited subset of features.
mozilla.github.io/rhino/compat/engines.html If you need such advanced features, I think it would be simplier to use Eventscripter to call an external javascript interpreter that supports more javascript features.
__________________
JD-Dev & Server-Admin |
#229
|
||||
|
||||
![]()
How about adding a button|link in JD settings/scripts toward this thread for user to see all available scripts?
|
#230
|
||||
|
||||
![]()
Hi,
I released my script you can find at some post before this one in this thread. Here is the direct link: Code:
board.jdownloader.org/showpost.php?p=410187&postcount=210 |
#231
|
||||
|
||||
![]()
@fred_gaou: You can post links that link to our board. Those are whitelisted.
Thanks for your contribution. Once such a *index* post exists, we can easily link it in eventscripter, great idea!
__________________
JD-Dev & Server-Admin |
#232
|
|||
|
|||
![]() Code:
// Save Link URLs // Files will be created in default (Global) download folder // Trigger Required: A Download Stopped if (link.isFinished()) { var data = "<details><summary>" + link.getName() + "</summary><table>"; var urls = { "Content": link.getContentURL(), "Container": link.getContainerURL(), "Origin": link.getOriginURL(), "Referrer": link.getReferrerURL() }; for (x in urls) { if (urls[x]) data += "<tr><td>" + x + "</td><td> : <a href=\"" + urls[x] + "\">" + urls[x] + "</a></td></tr>"; } data += "</table></details>"; var folder = callAPI("config", "get", "org.jdownloader.settings.GeneralSettings", null, "DefaultDownloadFolder"); var date = new Date().toDateString().substr(4); var file = folder + "/" + date + ".htm"; writeFile(file, data, true); } |
#233
|
|||
|
|||
![]()
hi @mgpai
i am trying to find away to rename video files to the name of the archives name example mgpai.the.movie.rar contains fghjk.mp4 --rename--> mgpai.the.movie.mp4 edit but of course not limited to mp4.mkv/mp4/avi/wmv/flv etc. thanks Last edited by animus; 10.11.2017 at 14:56. |
#234
|
|||
|
|||
![]()
Packagizer has an option to rename files after extraction.
|
#235
|
|||
|
|||
![]()
I came up with a way to send myself an email after a package is finished in JD. The trigger for the Event Scripter is "package finished". Here is the script:
Code:
//Add your script here. Feel free to use the available api properties and methods callAsync(function(exitCode, stdOut, errOut) {}, "C:\\sendEmail.exe", "-o", "tls=yes", "-t", "someone@gmail.com", "-u", "Download Completed:", package.getName(), "-m", "Download completed:", package.getName(), "-f", "youremail@gmail.com", "-s", "smtp.gmail.com:587", "-xu", "yourusername", "-xp", "yourpassword"); Info "C:\\sendEmail.exe" : the path were the sendEmail is in your PC "-t", "someone@gmail.com" : the address which will notified "-f", "youremail@gmail.com" : the address which will send the notification "-xu", "yourusername" : your username on the "-f" account "-xp", "yourpassword" : your password on the "-f" account You will need a very simple program called "Sendemail". Download the version with TLS support. You will also need to enable POP and IMAP in the Gmail account you will use to send the notification from (the "f" attribute email address). In addition you need to turn on the "Access for less secure apps" on this account or else the Gmail with block the access to the acount. I would like to thank Jiaz for helping me start and finish it. Hope it helps Last edited by torrero007; 17.11.2017 at 13:32. Reason: corrections |
#236
|
|||
|
|||
![]()
Hi,
with the new trigger-functionality now we can start a script on button-press. Very, very nice. With this scenario I want to build an interactive script with an datetime-picker at script start. For instance: 1. button pressed in JD-menu launches the script. 2. the script should launch a dialog box with a datetime-picker (at best there would be a cancel-button). 3. after input the script then processes the value ... (or abortes on cancel-button). Now my question: How to render the picker, because we have no html-canvas onto we can render the UI-elements (form, etc)? (The only GUI-canvas I see is the alert-popup, but can it blown up to a multifunctional UI-element?) Thx for reading this. A lot more thanks for a reply.
__________________
Sys-Info: Win10Home32bit | NTFS | OracleJRE1.8 | JD2 with GUI Last edited by ottoS; 25.11.2017 at 18:16. |
#237
|
||||
|
||||
![]()
@ottoS: what for do you need the date picker exactly for? You could just let user enter input like hours:minutes:day...
__________________
JD-Dev & Server-Admin |
#238
|
|||
|
|||
![]() Quote:
What I'm doing wrong? Sorry for the questions. |
![]() |
MaybeGrimm |
Message deleted by Jiaz.
|
#239
|
|||
|
|||
![]()
@MaybeGrimm: The script which you have quoted, is used to embed comments to image file. In your other thread you mentioned you need a script which can create 'Single Info-file'. Can you please clarify as to which kind of script you are looking for?
|
#240
|
|||
|
|||
![]()
The single info file was a second option, but what I wanted was that the comments appear in the file metadata. Just that I didn't tought that was possible, but it's what I prefer (and what this script does, if I don't misunderstand).
|
![]() |
Thread Tools | |
Display Modes | |
|
|