Subscribe Bookmark RSS Feed
brady_brady

Staff

Joined:

Jun 9, 2012

Fast and Easy Custom Menus in JMP

The resources available here will let you quickly and easily create and manage customized menus like the ones in the JMP starter.

In addition to the slide deck used to present this topic at 2016 Discovery, 3 resources are attached:

- A specifications data table, with example entries that will let you get started immediately. Be sure you download this, as it is the primary tool you'll use to create the custom menus.

- A .jsl script which is identical to the one contained in the specifications table. The script creates another script, which, when run, creates a new menu.

- An addin, which serves as an example of how multiple custom menus can be presented to users under a single submenu. The add-in also installs with many icons which you may find useful as you create your custom menus. The entire path for an icon named "book.png" is "$Addin_Home(com.jmp.brady.CustomStarterMenu)/book.png". PLEASE NOTE: not all of the platform launch buttons in the sample menu(s) are active. The menus and data table are simply included as an example of what can be done, and how to complete the table.

To easily view the icons and / or transfer them to another folder, open the addin folder by selecting View > Addins, choosing the Custom Starter Menu addin, and clicking the link in the dialog.

To create a custom menu using the specifications table, place your information into the first 5 columns of the Specifications data table:

  • Category: Give a name for the submenu in which you want the selection to appear.
  • Icon: If you would like an icon to appear next to the button, include a link to it here. NOTE: Icons are not resized!
  • Button: Enter the text you’d like to appear on the button.
  • Script: Enter the JSL you want to execute when the button is pressed. This could be anything from a single-word platform launch, to an entire JSL script.
  • Description: Enter any helpful text you’d like to include next to the button.

8613_Pic2.png

The next image shows the menu produced by the specifications table above.

8614_pic3.png

Once you’ve entered in all the information for each button, create a column of 1/0 flags for each menu you’d like to create. Use a 1 to show the item, and a 0 if you do not want to show the item. In the screenshot below, we see that the Beginner, Intermediate and Advanced menus will each present a different combination of buttons.

8615_pic4.png

Now, run the Create Custom Menu Scripts data table script (included in the table), which will prompt you to select one or more menus to create:

8616_pic5.png

When you press OK, a script is produced for each of the selected menus. Run the appropriate script to produce each menu. (The example below corresponds to the Intermediate menu.)

8617_pic6.png

It is also easy to package a collection of menu scripts as an add-in, allowing users to access any of them as desired.

8618_pic7.png

Article Tags
Contributors