JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 13.02.2025, 13:42
StefanM's Avatar
StefanM StefanM is offline
JD Legend
 
Join Date: Oct 2020
Posts: 777
Default Script Request: Script for temporary Speed Limit

@mgpai

(or if somebody else can help?)

Some time ago you created below script for me which is extremely usefull!
Thanks again!

Would it be possible, to create another script, which does the same for Speed Limit?

It should work as follows:
When I check the control box Settings->Speed Limit, the script should automatically uncheck it after e.g. 600 seconds.

Thanks in advance for any efforts taken!


Code:
/*
    disable clipboard monitoring
    trigger : interval
    enable 'synchronous execution of script' in the top panel
*/

var seconds = 600;
var clipboardMonitored = function() {
    return callAPI("config", "get", "org.jdownloader.settings.GraphicalUserInterfaceSettings", null, "ClipboardMonitored");
}

if (clipboardMonitored()) {
    sleep(seconds * 1000);
    callAPI("config", "set", "org.jdownloader.settings.GraphicalUserInterfaceSettings", null, "ClipboardMonitored", false);
    //alert("clipboard moinitoring disabled");
    //playWavAudio(JD_HOME + "/themes/standard/org/jdownloader/sounds/captcha.wav");
}
Reply With Quote
  #2  
Old 13.02.2025, 13:58
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,680
Default

Code:
/*
    disable speed limit
    trigger : interval
    enable 'synchronous execution of script' in the top panel
*/

var seconds = 600;
var interfaceName = "org.jdownloader.settings.GeneralSettings";
var key = "DownloadSpeedLimitEnabled";
var speedLimitEnabled = callAPI("config", "get", interfaceName, null, key);

if (speedLimitEnabled) {
    sleep(seconds * 1000);
    callAPI("config", "set", interfaceName, null, key, false);
}
Reply With Quote
  #3  
Old 13.02.2025, 15:31
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 82,056
Default

@mgpai: thanks for your help
__________________
JD-Dev & Server-Admin
Reply With Quote
  #4  
Old 13.02.2025, 16:19
StefanM's Avatar
StefanM StefanM is offline
JD Legend
 
Join Date: Oct 2020
Posts: 777
Default

Quote:
Originally Posted by mgpai View Post
Code:
/*
    disable speed limit
    trigger : interval
    enable 'synchronous execution of script' in the top panel
...
That was fast as a greased lightning.
Thank you very, very, much!
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 20:18.
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 - 2025, Jelsoft Enterprises Ltd.