This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Pass variable to Macro from toolbar

I have far too many little macros in separate files and run by toolbar buttons.   I would like to add them all to one macro file and pass a variable in choosing the appropriate macro function to run.   Below is what I would like to do but PHP flavored. How can I produce this desired effect in Extra basic?

Passed in like: url.php?picMacro=2

$picMacro =  $_GET['name'];
switch ($.picMacro) {
  case "1":
  case "2":
  case "3":


Mainframe Access
  • Hi David,

    I will do some research, but I don't think it is possible to pass a command line parameter to an Extra Basic macro.


    Jeff B.

  • Suggested Answer

    Hi David,

    It could be possible to create an application that may accept command line style parameters that the application could then parse and call the master Extra! Basic Macro, but that would be completely outside of the product.  The ebm macros are designed to be called and perform a specific function.  This functionality is not possible in the macro engine at this time. 


    Jeff B.

  • Thank you for your assistance.  I’m not trying to pass from the command line, I’m trying to pass from and extra toolbar to the macro.  Sorry if I explained that poorly.  The image below is the dialog in extra to define toolbar buttons.  Or is that still considered calling from command line?  Thanks 

  • Hi David,

    The button action for Run Macro is not expecting anything but the name of an existing macro.  If you put anything else in the drop down box that is not the name of a macro, the button call will fail.  I was using the term "Command line parameter" loosely to represent passing a parameter along with the macro name.



  • Thank you again for your input and assistance.  I guess I’ll just need to make a dialog box pop up with all the buttons on it rather than a tool bar.   

Reply Children
No Data