Choose Language Hide Translation Bar
BHarris
Community Trekker

How to enable startup scripts

I just created a custom transform script for unit conversions, e.g. ft to km.  Pretty cool that JMP lets me do this.

 

But now I'd like those to be enabled every time I run JMP.  I searched for "Startup scripts" and similar, but didn't see any mention anywhere of how to do this.

 

How can I make those custom transforms permanent?  Or, how can I have JMP automatically run a .jsl every time I launch it?

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: How to enable startup scripts

The documentation for this is located in the Scripting Guide

Run a Script at Start Up
If you want to run the same script every time you start JMP, name it jmpStart.jsl and place it in
one of the following folders, as appropriate for your operating system. When JMP starts, JMP
looks for the jmpStart.jsl script in these folders in the order in which they are listed here. The
first one that is found is run, and the search immediately stops.
Note: Some path names in this section refer to the “JMP” folder. On Windows, in JMP Pro, the
“JMP” folder is named “JMPPro”. In JMP Shrinkwrap, the “JMP” folder is named “JMPSW”.
On Windows:
1. C:/Users/<username>/AppData/Roaming/SAS/JMP/14
2. C:/Users/<username>/AppData/Roaming/SAS/JMP
On Macintosh:
1. /Users/<username>/Library/Application Support/JMP/14
2. /Users/<username>/Library/Application Support/JMP
The jmpStart.jsl script runs only for a particular user on a computer. You can add a script
named jmpStartAdmin.jsl in one of the following places, as appropriate for your operating
system. This script is run for every user on a computer. JMP searches for the administrator
start-up script first, and runs it if found. Then JMP searches for the user start-up script, and
runs it if found.
On Windows:
1. C:/ProgramData/SAS/JMP/14
2. C:/ProgramData/SAS/JMP
On Macintosh:
1. /Library/Application Support/JMP/14
2. /Library/Application Support/JMP

Jim

View solution in original post

4 REPLIES 4
Highlighted
txnelson
Super User

Re: How to enable startup scripts

The documentation for this is located in the Scripting Guide

Run a Script at Start Up
If you want to run the same script every time you start JMP, name it jmpStart.jsl and place it in
one of the following folders, as appropriate for your operating system. When JMP starts, JMP
looks for the jmpStart.jsl script in these folders in the order in which they are listed here. The
first one that is found is run, and the search immediately stops.
Note: Some path names in this section refer to the “JMP” folder. On Windows, in JMP Pro, the
“JMP” folder is named “JMPPro”. In JMP Shrinkwrap, the “JMP” folder is named “JMPSW”.
On Windows:
1. C:/Users/<username>/AppData/Roaming/SAS/JMP/14
2. C:/Users/<username>/AppData/Roaming/SAS/JMP
On Macintosh:
1. /Users/<username>/Library/Application Support/JMP/14
2. /Users/<username>/Library/Application Support/JMP
The jmpStart.jsl script runs only for a particular user on a computer. You can add a script
named jmpStartAdmin.jsl in one of the following places, as appropriate for your operating
system. This script is run for every user on a computer. JMP searches for the administrator
start-up script first, and runs it if found. Then JMP searches for the user start-up script, and
runs it if found.
On Windows:
1. C:/ProgramData/SAS/JMP/14
2. C:/ProgramData/SAS/JMP
On Macintosh:
1. /Library/Application Support/JMP/14
2. /Library/Application Support/JMP

Jim

View solution in original post

Highlighted
gzmorgan0
Super User

Re: How to enable startup scripts

@BHarris,

 

I would create a function (or set of custom functions) and make them an Add-In. You can have the script run at each JMP session start-up. Below is a screenshot of the  New Add-In dialog. Then you can use these functions like any JMP function.

You can create a hot key to initiate the script to run and more. There are multiple methods, what's best depends upon how you paln to use this. For example:

  • define a hot key that searches the current data table() for any column with ft as its units, then convert that column and change its units to km.  that would be a script
  • define a custom user function say ::MyConvert(column, from_units_text, to_units_text)  e.g. ::MyConvert(:SidewalkLength,"ft", "km").
  • etc. 

 

Select from the JMP Main Menu > Help > Books > Scripting Guide. For JMP 14, chapter 16, near page 816, look for the documention for creating and managing an Add-In. I recommend you read this first before building one. Note you can specify this can run when JMP starts.

image.png

Highlighted
gzmorgan0
Super User

Re: How to enable startup scripts

Oops, @txnelson posted before I completed my reply.  Jim provided another option.

 

Just a heads-up, that some companies have security that look for application (OS) start-up scripts that complain or hinder their use. That is why I typically use the Add-in feature, JMP initaites then runs the Add-Ins that were configured to run at start-up.

 

 

Use what works best for you and your environment.  Good luck.

Highlighted
Jeff_Perkinson
Community Manager Community Manager

Re: How to enable startup scripts

I think @gzmorgan0 has a good idea with an add-in.

 

I have two things to add here:

 

  1. An add-in doesn't have to have a user interface or any code other than code to run at start-up. In this way you can create an add-in that is only a library of functions.
  2. There's already an example of this kind of add-in, and, while it doesn't do feet to kilometers, it does do feet to miles and miles to kilometers. It's also extendable through simple editing of a data table. Check it out: Conversion Function Library
-Jeff