Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run J-Link method from mapkey w/argument?

  • Thread starter Thread starter joncl
  • Start date Start date
J

joncl

Guest
Is there a way to send an argument to a method in a running J-Link app from a mapkey?

I'm building a custom utility to automate the measure tool in Wildfire 3.0 using J-Link. I've successfully added a new menu to the menubar with several sub-menus. Basically, each menu button sends an argument to a method in the running J-Link app. It'd also be great to add a drop-down in the toolbar with custom icons to represent each command. The problem is, custom toolbar buttons can only be associated to mapkeys, I think. Or is there a way to execute the J-Link method with an argument from a mapkey. Probably a tall order, I know. Otherwise, I guess I'd need a separate J-Link app for each measure command so that it'd be visible in the Auxiliary Applications to be able to run it with a mapkey. That's not very pretty though.
smiley5.gif
Any ideas?

measureit1.gif

measureit2.gif





Edited by: joncl
 
Another question: I have a custom menu with sub-menus, like in the above post. Is it possible to add a button that sits at the very bottom of the main menu? For example, I want "A Button" to sit below "Axis to", like below. Is it possible?

View attachment 4264

Here's the Java code I'm using to create the above menu:

session.UIAddMenu( MENU_NAME, "Analysis", MSG_FILE, null );
session.UIAddMenu( "mit.PlaneTo", "", MSG_FILE, MENU_NAME );
session.UIAddMenu( "mit.AxisTo", "mit.PlaneTo", MSG_FILE, MENU_NAME );

UICommand aButtonCmd = session.UICreateCommand( "aButtonCmd", new DefaultUICommandActionListener() );
session.UIAddButton( aButtonCmd, MENU_NAME, "mit.AxisTo", "aButton", "aButtonHelp", MSG_FILE );
 
hi

I'm trying to make a menu like this. You could present MSG_FILE?

grateful
 

Part and Inventory Search

Sponsor

Back
Top