JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #741  
Old 03.06.2019, 16:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,353
Default

Quote:
Originally Posted by JDFan View Post
I would prefer a global switch in Advanced Settings. I assume that's easier to implement compared to a change in the script engine.
script command is much easier than global switch also script command has the advantage that yuo can enable/disable it within the same script and not have impact on all other scripts as well
__________________
JD-Dev & Server-Admin
Reply With Quote
  #742  
Old 03.06.2019, 16:30
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default YouTube plugin: What does YT_DESCRIPTION contain?

I'm wondering because I get always null!
Reply With Quote
  #743  
Old 03.06.2019, 16:40
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default

Quote:
Originally Posted by Jiaz View Post
script command is much easier than global switch also script command has the advantage that yuo can enable/disable it within the same script and not have impact on all other scripts as well
Then a script command please! Many thanks in advance.
Reply With Quote
  #744  
Old 03.06.2019, 16:42
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,353
Default

@JDFan: it contains the description/text but only temporarily and currently not available via normal getProperty because those details are fetched and cached during session, not stored.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #745  
Old 03.06.2019, 16:47
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,353
Default

Quote:
Originally Posted by JDFan View Post
Then a script command please! Many thanks in advance.
after next core update there are
setNotifyOnException(true/false), show(yes,no) dialog to inform about exception
setDisableOnException(true/false), disable(yes,no) script on exceptions
__________________
JD-Dev & Server-Admin
Reply With Quote
  #746  
Old 03.06.2019, 18:20
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default alert box is flickering, complex problem

Complex problem, really. Script triggered by Script Downloadlist Contextmenu Button Pressed (name Test). YouTube video is downloaded. Flickers only with that link (others too). BUT when you change only some letters of 0Mp2kwE8xY0 no flickering (e. g. M -> 1)! Can someone reproduce that crazy behaviour?

Code:
if ( name == "Test" )
{
  //      123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\
  alert( "Line1: **External links are only visible to Support Staff**) ;
}
And when no flickering occurs, the height is too small.
Reply With Quote
  #747  
Old 03.06.2019, 18:55
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default alert box wishes

1. Optional (checkbox) non-proportional font like Courier New. Better readable debug outputs.
2. Properties for x, y, w(idth) and h(eight).
3. Copy to Clipboard button. Maybe Paste too.
Reply With Quote
  #748  
Old 03.06.2019, 18:58
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default Clipboard access via script

Reading from and writing to the clipboard should be possible. Maybe with special security flag via Advanced Settings.
Reply With Quote
  #749  
Old 03.06.2019, 19:00
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default Input dialog

Would simplify automation (passing parameters from other apps, e. g. AutoHotkey and speech recognition). Maybe with special security flag via Advanced Settings.
Reply With Quote
  #750  
Old 03.06.2019, 19:53
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default Get hostname

Maybe via the Environment Object? getHostname()?? Different PCs/notebooks, different folder structures. Want to set pathes depending on the PC/notebook in use.

Edit: There seems to be an environment variable COMPUTERNAME.
Code:
sComputerName = getEnv( "COMPUTERNAME" ) ;
alert( sComputerName ) ;

Last edited by JDFan; 03.06.2019 at 21:20.
Reply With Quote
  #751  
Old 03.06.2019, 19:58
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default Global variables

Should be accessible by all scripts. For a limited number of global script variables environment variables could be used of course, like JD_VarName.
Reply With Quote
  #752  
Old 03.06.2019, 21:16
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default Event Scripter export/import

The possibility to export all marked scripts would be great. Should be an xml file so it could be created/modified with other tools. And of course the corresponding import functionallity.
Maybe with support by the event scripter itself? Methods like listScripts(), exportScripts(), importScripts(), enableScripts(), disableScripts(). Parameter an arrray of scripts. Propeties enabled, name, trigger plus all the GUI settings.
Reply With Quote
  #753  
Old 04.06.2019, 15:26
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,353
Default

Quote:
Originally Posted by JDFan View Post
The possibility to export all marked scripts would be great. Should be an xml file so it could be created/modified with other tools. And of course the corresponding import functionallity.
Maybe with support by the event scripter itself? Methods like listScripts(), exportScripts(), importScripts(), enableScripts(), disableScripts(). Parameter an arrray of scripts. Propeties enabled, name, trigger plus all the GUI settings.
I don't think we have to create new commands for this. you can already access the advanced settings storage from the scripts via callapi and accessing the advanced settings and then read/write/modify or export/import. I'm sure mgpai can help you with that
__________________
JD-Dev & Server-Admin
Reply With Quote
  #754  
Old 04.06.2019, 15:27
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,353
Default

Quote:
Originally Posted by JDFan View Post
Should be accessible by all scripts. For a limited number of global script variables environment variables could be used of course, like JD_VarName.
What *global variables* do you mean? You already can use set/getProperty(key,boolean) method with local(script,false)) or global(shared,true) and share information accross different scripts with help of global properties
__________________
JD-Dev & Server-Admin
Reply With Quote
  #755  
Old 04.06.2019, 15:29
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,353
Default

Quote:
Originally Posted by JDFan View Post
Maybe via the Environment Object? getHostname()?? Different PCs/notebooks, different folder structures. Want to set pathes depending on the PC/notebook in use.

Edit: There seems to be an environment variable COMPUTERNAME.
Code:
sComputerName = getEnv( "COMPUTERNAME" ) ;
alert( sComputerName ) ;
You can either use getEnv to access the environment variables and/or use getEnvironment to access the EnvironmentSandbox object
__________________
JD-Dev & Server-Admin
Reply With Quote
  #756  
Old 04.06.2019, 15:30
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,353
Default

Quote:
Originally Posted by jdfan View Post
reading from and writing to the clipboard should be possible. Maybe with special security flag via advanced settings.
Quote:
Originally Posted by jdfan View Post
3. Copy to clipboard button. Maybe paste too.

__________________
JD-Dev & Server-Admin
Reply With Quote
  #757  
Old 04.06.2019, 16:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,353
Default

Quote:
Originally Posted by JDFan View Post
Complex problem, really. Script triggered by Script Downloadlist Contextmenu Button Pressed (name Test). YouTube video is downloaded. Flickers only with that link (others too). BUT when you change only some letters of 0Mp2kwE8xY0 no flickering (e. g. M -> 1)! Can someone reproduce that crazy behaviour?

Code:
if ( name == "Test" )
{
  //      123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\
  alert( "Line1: **External links are only visible to Support Staff**) ;
}
And when no flickering occurs, the height is too small.
The flickering happens because of resize loop of auto break on text caused by the space. This is more complex to handle better and sorry to say but at the moment not that important.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #758  
Old 05.06.2019, 15:50
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default Event Scripter export/import

@mgpai:

Can you be so kind and support me with some basic hints, e. g. concerning callapi and where I can find the corresponding methods:
Quote:
Originally Posted by Jiaz View Post
I don't think we have to create new commands for this. you can already access the advanced settings storage from the scripts via callapi and accessing the advanced settings and then read/write/modify or export/import. I'm sure mgpai can help you with that
Reply With Quote
  #759  
Old 05.06.2019, 15:54
JDFan JDFan is offline
Vacuum Cleaner
 
Join Date: May 2019
Posts: 18
Default INI file support and JSON

I really like INI files. And JSON, too. Scripter support?
Reply With Quote
  #760  
Old 05.06.2019, 15:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,353
Default

@JDFan: see https://my.jdownloader.org/developers/ for list of api methods and their parameters
__________________
JD-Dev & Server-Admin
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 16:57.
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 - 2019, Jelsoft Enterprises Ltd.