Don McCormack, JMP Principal Customer Advocate, likes to share his work. He recently gave a tip on how to save a script to a new menu that you create. This lets you use the menu to execute the script against data where the column names and modeling types are the same as for the original analysis.
This is useful, for example, if you receive standard information every week about a product and want to repeat the analysis on the latest data. The script you save can be run against the latest data table you have open in JMP.
The steps are straightforward.
- 1. Save an analysis as a JMP script.
- a. Under the analysis red triangle, select Script>Save to Script Window.
- b. Copy the script into a buffer.
- 2. Create a main menu and its sub-menu. (After creation, the main menu will display on your menu bar and when you expand the new main menu you will see a new sub-menu that will execute your script.)
- a. Select Edit>Customize>Menus and Toolbars.
- b. Expand Main Menu. This lists the menus you will see on your JMP menu bar.
- c. Right-click on the Menu item next to which you want your new menu to appear, then select either Insert Before or Insert After, according to the location you desire. Two items labeled Untitled Menu appear – a new main menu and its new sub-menu.
- 3. Name your new main menu.
- a. Right-click the top-level Untitled Menu and select Properties. A Menu Item Properties window appears.
- b. In the Caption box, type the name of your main menu. Then click OK.
- 4. Name your new sub-menu.
- a. Right-click the sub-menu Untitled Menu and select Properties. A Menu Item Properties window appears.
- b. Under Menu Item Type, select the Command radio button.
- c. In the Caption box, type the name of your sub-menu, then click the OK button.

5. Add the script.
- a. Select the Execute this JSL radio button.
- b. Copy the script into the box next to Execute this JSL.
- c. Click OK.
- 6. Save your new menu and sub-menu.
- a. Click the Apply button in the top left corner of the screen, above the open Menus window.
- b. Check your menu bar to see your new menu and verify that you can run the script from its new sub-menu.

JMP saves your work, so the next time you open JMP, the menus will be there. You can also restore the default menus at any time by selecting Edit > Customize > Revert to Factory Defaults.
Want more tips? Sign up for one of our live Mastering JMP Webcasts. We offer at least one every week into mid-May 2010.