#561
|
|||
|
|||
![]()
OK, so I have to embed the js code in a jason syntax. But what is the correct identifiert for the trigger?
And jiaz said some years ago that before a reconnect is a problem, as after the update JD "forgets" to reconnect https://board.jdownloader.org/showpo...26&postcount=7 |
#562
|
|||
|
|||
![]()
Sorry, I should have read the other posts in that thread before I post the "issue" that the two of you discussed 4 years ago.
I embedded the scriptcode in json. It is valid jason (correctly escaped) according to **External links are only visible to Support Staff**... - however jd refused to accept it: „Sorry, failed to set new value“ Quote:
|
#563
|
|||
|
|||
![]()
Thanks for all the very useful scripts!
![]() |
#564
|
||||
|
||||
![]()
@plaintext: easiest way would be to setup the eventscripter in JDownloader with GUI and then copy/paste the value from Settings-Advanced Settings-EventScripter.scripts
That way you don't have to care about format/encoding yourself
__________________
JD-Dev & Server-Admin |
#565
|
|||
|
|||
![]()
Oh, The WebUI has a GUI for the event Scripter so I expected it to be the same GUI as the Java Frontend.....
regarding the question before/after reconnect: If it is done after a reconnect, mgpai said this script would interrupt running downloads that started right after the reconnect. But: If it is done before a reconnect, how does JD know it has to reconnect after the update? I want to avoid solving CAPTCHAs just for JD to notice that is has to reconnect. Even worse it might break the reconnect. And even worse: Lets say download A causes the need to reconnect. As A is waiting for a reconnect, download B does not start. After update & reboot download B starts and A cannot continue as B is running .... Btw: what is the "APIPanel Visible" option? Jiaz said on page 11 "it shows/hides the api help panel" - but what/whee is the api help panel ? thank you. |
#566
|
||||
|
||||
![]() Quote:
After installation -> download starts -> detects waiting time -> before reconnect -> no update available -> do reconnect -> continue download
__________________
JD-Dev & Server-Admin |
#567
|
||||
|
||||
![]() Quote:
so I also think that check/install update on *After Reconnect* trigger would be better idea and the script can be in sync mode and other downloads would not start then
__________________
JD-Dev & Server-Admin |
#568
|
||||
|
||||
![]()
It's the api documentation for the GUI script editor available in GUI version
__________________
JD-Dev & Server-Admin |
#569
|
|||
|
|||
![]() Quote:
Thank you for clarification. |
#570
|
||||
|
||||
![]()
There is no differentiation between gui and headless version for setting interfaces and the webui just shows generic interface for all available settings
![]()
__________________
JD-Dev & Server-Admin |
#571
|
|||
|
|||
![]()
Would it be possible to request a script that finds duplicate within the download list and another to verify that it has been downloaded? Having major issues organizing and cleaning mine after a few user screw ups.
|
#572
|
|||
|
|||
![]()
Can you contact me in JD Chat?
|
#573
|
|||
|
|||
![]()
i'm trying to send package name to a batch file to send a push notification! the notification works as expected, but i like to include the package name, here are the scripts i'm testing
event scripter: Code:
// TRIGGER = Package Finished disablePermissionChecks(); var myFilePackage = package; var myString = myFilePackage.getName(); callAsync(function(exitCode, stdOut, errOut) {}, "F:\\link to\\file.bat", "myString"); batch: Code:
@echoff myString=$1 curl -X POST -d "payload={\"text\": \"JDownloader: A file "'$myString'" has been completed!\"}" "**External links are only visible to Support Staff** message received at notification service: Code:
JDownloader: A file '$myString' has been completed! any help will be appreciated! thanks in advance! :attention: |
#574
|
|||
|
|||
![]()
well, found out the errors in my scripts:
event scripter: Code:
// TRIGGER = Package Finished disablePermissionChecks(); var myFilePackage = package; var myString = myFilePackage.getName(); callAsync(function(exitCode, stdOut, errOut) {}, "F:\\link to\\file.bat", myString); Code:
@echoff %1 curl -g -v -k -X POST -d "payload={\"text\": \"JDownloader: The file "'%1'" has been completed!\"}" "**External links are only visible to Support Staff** message received at notification service: Code:
JDownloader: The file 'Example FilePackage Name' has been completed! :woot: Last edited by almanteka; 08.02.2019 at 01:26. |
#575
|
|||
|
|||
![]()
Event scripter also has a postPage() method, which can be used instead of the batch file in this script.
Code:
var myString = postPage(myString/*URL*/, myString/*PostData*/);/*Loads a website (METHOD: POST) and returns the source code*/ /* Example: */var myhtmlSourceString = postPage("http://support.jdownloader.org/index.php","searchquery=captcha"); |
#576
|
|||
|
|||
![]() Quote:
|
#577
|
|||
|
|||
![]()
Example:
Code:
var url = "hxxp://notification.service"; var data = "payload={\"text\": \"JDownloader: The file " + package.getName() + " has been completed!\"}"; postPage(url, data); |
#578
|
|||
|
|||
![]()
WOW! worked perfectly! thank you very much!
|
#579
|
||||
|
||||
![]()
@almanteka: just out of interest, what notification service do you use?
![]()
__________________
JD-Dev & Server-Admin |
#580
|
|||
|
|||
![]()
i'm using Synology Chat.
|
![]() |
Thread Tools | |
Display Modes | |
|
|