#201
|
||||
|
||||
![]() Quote:
Plus the script does not contain any linkcheckDone
__________________
JD-Dev & Server-Admin |
#202
|
||||
|
||||
![]()
What is the Advanced settings>EventScripter: API Panel Visible supposed to do?
I enabled it and restart JD2 and see no changes. I'd like to output some strings to debug my scripts in a convenient place (in the JD GUI) with log() function or else. How can I do that except checking the JD_HOME/logs/xxxx/ScriptEnvironment.log.0? |
#203
|
||||
|
||||
![]()
@fred_gaou:
it shows/hides the api help panel You could either use alert() to open a window that shows debug info or write our debug to some sort of debug/log file. Or do you have something else in mind?
__________________
JD-Dev & Server-Admin |
#204
|
|||
|
|||
![]()
Hi.
I escaped special characters. and then as shown below resulted. (run script is no problem.) ![]() thank you. |
#205
|
|||
|
|||
![]()
Hi.
sorry for ask so many. Garbled japanese language in scripts editor. Exists Change font method? ![]() thanks for support. |
#206
|
||||
|
||||
![]()
@pachi: try Settings-Avanced Settings-LAFSettings.fontname.
for example 'Arial Unicode MS' without ' I've created a ticket for the comment issue
__________________
JD-Dev & Server-Admin |
#207
|
||||
|
||||
![]()
Eventscripter does not yet support custom font from advanced settings
__________________
JD-Dev & Server-Admin |
#208
|
||||
|
||||
![]()
Using alert() to debug is doable. But I was asking just in case JD offered something like a debug console in the script panel or in a tab that would show all script output using the log() function. Those features won't prevent me from writing my script but would be a friendly way to do it.
|
#209
|
||||
|
||||
![]()
Thanks for the feedback! I like the debug console idea
__________________
JD-Dev & Server-Admin |
#210
|
||||
|
||||
![]()
Trigger required: Interval
Please check the "Synchronous execution of script" box available in this edition panel to avoid multiple script executions at the same time and log file corruption (even if it should not happen anyway). -------------------------------------- Author : freMea (myself) Version : 2017.10.30 Download link: gist.github.com/freMea/f2787b6c74097a4ef16cd21904f71517 -------------------------------------- D E S C R I P T I O N Every time interval the user specified (OPTIONS: interval - default is 5 minutes), the script runs in background to remove downloaded and completed packages from the download panel if they are older than specified time (OPTIONS: finished_since - default is 60 minutes). It is a better solution than the built-in feature option that remove packages as soon as they are completed because you may need to check some information about it before it gets removed from the list. In any case, with this script, even if you set it to remove finished packages as soon as they are downloaded, all the informations about downloaded packages that have been removed by the script will be logged in the chosen target folder (OPTIONS: logPath - default folder is "%temp%" and log file name is 'JD - removed packages.log"). This log file won't grow up endlessly, its size is controlled by option that remove entries that are older than specified age in days (OPTIONS: max_logged_days - default is 3). ----- Note 1: %temp% is the default temporary folder that is used by the operating system and applications available to the currently logged on user. On Windows just write %temp% in the address bar of file explorer to open it. If you want to customize the path (OPTIONS: logPath), I recommend to use / as a path separator no matter the OS you use, it will be translated correctly by JD even on Windows. Else if you want to use \ anyway, you will have to double it like c:\\path to\\my log. Note 2: At first script execution, you'll be prompted to allow script to call JD API and to do other actions, all required to make it work. (Use the OPTIONS section at the top of script to customize to your need) Last edited by fred_gaou; 31.10.2017 at 01:19. |
#211
|
|||
|
|||
![]() Quote:
but just event script editor is not change... thank you for reply. |
#212
|
||||
|
||||
![]()
@fred_gaou: Thanks for the script. I made the link visible
I suggest to use interval trigger and iterate through packages, check for finished state and finished date and then proceed. your script executes and actively waits 1 hour. Your script has some flaws! It doesn't check for removed/changed package. if you reset/add stuff to the package while the script is waiting, it will remove even if downloads are still in progress
__________________
JD-Dev & Server-Admin |
#213
|
||||
|
||||
![]() Quote:
Is there a way to get the creation date of a any file in a given path? |
#214
|
||||
|
||||
![]()
Let's say you have packages with disabled links (all are disabled for instance because of package context menu>disable).
Even if the progression is 0% if you use this script, it returns these packages as finished: Code:
var aPackages = getAllFilePackages(); /*Get a list of all packages*/ var sText = ""; //will be filled with content (or not :-) for (var i = 0; i < aPackages.length; i++) { var package = aPackages[i]; var packageName = package.getName(); var isFinished = package.isFinished(); sText += "Package " + (i + 1) + " : " + packageName + " (finished: " + isFinished + ")\r\n"; } alert(sText); Last edited by fred_gaou; 18.10.2017 at 01:07. |
#215
|
||||
|
||||
![]() Quote:
I have to wait those bug to be solved to finish my script. |
#216
|
||||
|
||||
![]() Quote:
__________________
JD-Dev & Server-Admin |
#217
|
||||
|
||||
![]() Quote:
Code:
var myFilePath = getPath(myString/*Path to a file or folder*/);/*Get a FilePath Object*/
__________________
JD-Dev & Server-Admin |
#218
|
||||
|
||||
![]() Quote:
getFinishedDate will be fixed with next Core update isFinished is no bug. Disabled Links are not counted! Links must be enabled and in finished state.
__________________
JD-Dev & Server-Admin |
#219
|
||||
|
||||
![]()
will be fixed with next core update
__________________
JD-Dev & Server-Admin |
#220
|
|||
|
|||
![]() Quote:
i was can use japanese in script editor. |
![]() |
Thread Tools | |
Display Modes | |
|
|