#1
|
|||
|
|||
Eventscript: stop downloads when battery % lower than x
I think JDownloader doesn't have any option to stop downloads when the laptop battery is low, right? So I was thinking that if the abovementioned were possible I could make use of a third-party app like Robo Task etc. which has the option to execute batch files.
Thanks. |
#2
|
||||
|
||||
There are limited command line ability with JDownloader, you can find them for memory with --help or /? switches. Please keep in mind that these were originally added back a long time ago, and is quite limited/ I'd even goto say that function set wont change moving forward. There are functional API either clicknload/flashgot api, and the newer and more extensive api which myjdownloader browser extensions/webui runs off.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#3
|
|||
|
|||
I took a look into all of the above but couldn't make any progress. Event Scripter in MyJD looked promoising but I don't have the required knowledge. What's the simplest way to stop downloads when the laptop battery falls to say 35%?Right now I can probably with the help of a third-party app hibernate the laptop when battery is low but can that cause the running downloads to become corrupted?
|
#4
|
|||
|
|||
Quote:
Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader |
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
Quote:
Code:
/* Stop downloads when battery low (Windows OS) Trigger : Interval Recommended Interval 60000 (1 min) */ var target = 20; if (isDownloadControllerRunning()) { try { var result = callSync("WMIC", "PATH", "Win32_Battery", "Get", "EstimatedChargeRemaining"); var remaining = result.match(/EstimatedChargeRemaining \r\r\n(\d+) \r\r\n\r\r\n/)[1]; remaining < target && stopDownloads(); } catch (e) {}; } |
#7
|
||||
|
||||
@mgpai: NICE!
__________________
JD-Dev & Server-Admin |
#8
|
||||
|
||||
Cool!
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
Thread Tools | |
Display Modes | |
|
|