View Single Post
  #8  
Old 17.10.2016, 13:59
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 444
Default

Hide/Unhide Infobar Window

Adding custom command to Tray menu
  • Add script to event scripter
  • Tray Menu > Open Menu Manager > Add Action > EventScripter Trigger
  • In the right-side panel, change the name from "EventScripter Trigger" to "Infobar" (Exact name - without quotes - as specified in the script, case-sensitive)
  • Change Icon (Optional)
  • Save
Code:
// Hide/Unhide Infobar Window
// Trigger: Traymenu Button Pressed
// Can also use other 'button pressed' triggers if you want to specify/use 'keyboard shortcut'
// Requirements: Install and enable infobar extension
// Forum Topic: https://board.jdownloader.org/showthread.php?t=70617

if (name = "Infobar") {
    var infobar = "org.jdownloader.extensions.infobar.InfoBarConfig";
    var storage = "cfg/org.jdownloader.extensions.infobar.InfoBarExtension";
    var windowVisible = callAPI("config", "get", infobar, storage, "windowvisible");

    if (windowVisible) {
        callAPI("config", "set", infobar, storage, "windowvisible", false);
    } else {
        callAPI("config", "set", infobar, storage, "windowvisible", true);
    }
}

Last edited by mgpai; 18.10.2016 at 11:56. Reason: Modified scrtipt to Hide/Unhide Infobar Window instead of Enable/Disable Infobar Extension
Reply With Quote