#1
|
|||
|
|||
eventscripts - Bessere Doku?
Moin!
Gibt's irgendwo eine bessere, ausführliche Doku für den Eventscripter? Konkret bin ich auf der Suche nach 2 Dingen:
|
#2
|
||||
|
||||
1.) Was genau stellst du dir mit *Statusfenster* vor? Es ist möglich einen Info Dialog anzuzeigen via alert
2.) Du kannst das Script in einem beliebigen Editor deiner Wahl tippen und dann via Copy/Paste rüberkopieren. Ist ja normales Javascript. Im JDownloader Editor befindet sich oberhalb des Editors eine Anzeige mit allen verfügbaren Objekten/Methoden welche bei dem aktuell gewählten Event-Trigger verfügbar sind. Bei konkreten Fragen/Problemen am besten direkt hier https://board.jdownloader.org/showthread.php?t=70525 fragen. mgpai ist ein Meister des Eventscripters
__________________
JD-Dev & Server-Admin |
#3
|
|||
|
|||
@Skeeve:
Last edited by Jiaz; 04.10.2018 at 14:58. |
#4
|
||||
|
||||
__________________
JD-Dev & Server-Admin |
#5
|
|||
|
|||
Hi!
Sorry for not replying so long. "alert" will pause the script. What I meant is something that pops up telling the user that the script started (it's already running then) and remains open until the script ends and tells the window to close. Maybe even with a possibility to write information to this window if it's a long running process, updating a status bar or printing out some textual information. Copy & Paste from an external editor to the JD Editor is a bit tedious. I like more @mgpai's proposal of require-ing an external script. Definitely something I will look into. The List of methods is nice but not too helpful for someone who's not deeply involved in the inner workings of jDownloader. What I would like to see is more information about each of these methods. When to use them. What exactly is expected as inpuut and output by not jsut mentioning some black-box-class names but by explaining what these classes are. Maybe my JS experience is not sufficient and it's not JD experience that's required, but I have the feeling that all those functions and methods could be very powerfull but I have no clue how to use them and for what purpose to use them. |
#6
|
||||
|
||||
So you want some window to open up where you can write messages into it and after script has ended, either close by user or autoclose?
__________________
JD-Dev & Server-Admin |
#7
|
||||
|
||||
Hmm? myString = String, myBoolean= Boolean, myInt=Int and so on?
Maybe you can give examples what is unclear to you? Hmm? Can you give examples? Maybe I'm too deep into development and I can't see the problem, so would be nice if you can give examples
__________________
JD-Dev & Server-Admin |
#8
|
|||
|
|||
Regarding the window - Yes. Exactly.
Code:
/* =============== Global API =============== */ /* ========= Methods =========*/ alert(myObject[]);/*Show a Message Box*/ Code:
var myObject = callAPI(myString, myString, myObject[]);/*Call the MyJDownloader API*/ /* Example: */callAPI("downloadsV2", "queryLinks", { "name": true}) And what can I do with the result of the call? Code:
callAsync(myFunction, myString[]);/*Call a local Process asynchronous*/ /* Example: */callAsync(function(exitCode,stdOut,errOut){ alert("Closed Notepad");},"notepad.exe",JD_HOME+"\\license.txt"); Code:
var myString = callSync(myString[]);/*Call a local Process. Blocks Until the process returns*/ /* Example: */var pingResultString = callSync("ping","jdownloader.org"); Shall I go on? I think you get what I mean. |
#9
|
|||
|
|||
Quote:
Code:
callSync("msg", "console", "static text"); callSync("msg", "console", link.getName()); Popups with more advanced options can be displayed using Window Script Host. In addition to closing them manually or based on user specified time, they can be also be kept open and closed automatically using 'taskkill' command when the script ends. There might be similar alternatives in other OS too. |
Thread Tools | |
Display Modes | |
|
|