View Single Post
  #5  
Old 29.10.2021, 03:27
dawebbreb dawebbreb is offline
Baby Loader
 
Join Date: Oct 2021
Posts: 8
Default

For anyone interested, I was able to find an answer over at Scripts just like @Jiaz suggested. Thank you to @tb21 for providing the solution. Here it is:


//disable captcha sound at night
//Trigger "Interval"

var date = new Date();
var hours = date.getHours();

if (0);
else if (hours > 22 || hours <= 9) setCaptchaSoundEnabled( false);
else if (hours > 8) setCaptchaSoundEnabled( true);

function isCaptchaSoundEnabled() {
var key = "captchasoundenabled";
var interfaceName = "org.jdownloader.settings.SoundSettings";
var value = callAPI("config", "get", interfaceName, null, key); //bool
return value;
}
function setCaptchaSoundEnabled( truefalse) {
var key = "captchasoundenabled";
var interfaceName = "org.jdownloader.settings.SoundSettings";
var value = callAPI("config", "set", interfaceName, null, key, truefalse); //bool
return value;
}


Basically what it does is turn off the captcha sound after 2200 hours (Not AT 2200, but after. So in this case at 2300) and anytime before 0900. And then it will turn it back on AFTER 0800 (so 0900). This must be set as an interval script. I set mine to run every 15 mins.

You can modify the times as you please to make it work for your needs.

Last edited by dawebbreb; 29.10.2021 at 03:30.
Reply With Quote