JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > International Support > JDownloader 2
Reply
 
Thread Tools Display Modes
  #1  
Old 22.09.2015, 13:32
tunayx's Avatar
tunayx tunayx is offline
JD Legend
 
Join Date: Mar 2009
Location: Xp Sp3 wth Java 7 No Firewall / Turkey
Posts: 743
Default Eventscripter multiple buttons for the same trigger

I want to launch several Autohotkey macros from linkgrabber bottom toolbar. But I want each button launches only the assigned macro. Currently any button launches all the macros because their trigger is the same "Linkgrabber Bottombar Button Pressed"


Code:
 callAsync(function(exitCode, stdOut, errOut) {}, ["d:\\BACKUP THIS\\jdownloaderl.exe"]);

Code:
 callAsync(function(exitCode, stdOut, errOut) {}, ["d:\\BACKUP THIS\\moveall.exe"]);
etc...
Reply With Quote
  #2  
Old 22.09.2015, 15:08
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,569
Default

__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 16.10.2015, 13:49
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

@tunayx

Coalado showed me how it can be done.
  • Add multiple "Eventscripter Trigger" buttons to the menu/toolbar.
  • Give unique names to the buttons.
  • Use conditions in the script to match those button names to the macros.
  • When the button is pressed, JD will cycle through the macros and execute the one which matches the name of the button which has been pressed.
Code:
//If Button1 is pressed
if (name == "Button1") {
    //Execute this Macro
    alert("You pressed Button 1")
}

//If Button2 is pressed
if (name == "Button2") {
    //Execute this Macro
    alert("You Pressed Button2")
}

//If Button3 is pressed
if (name == "Button3") {
    //Execute this Macro
    alert("You Pressed Button3")
}

Last edited by mgpai; 16.10.2015 at 13:53.
Reply With Quote
Reply


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 18:12.
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 - 2024, Jelsoft Enterprises Ltd.