cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Neo
Neo
Level VI

How to construct a JMP add-in to run a floating window with click boxes for different sequentially dependent scripts?

I have two main scripts (1) trendStudy (2) corrStudy, both of which call a bunch of other scripts but corrStudy does not call any scripts which trendStudy calls.

trendStudy produces a data table and a chart. corrStudy needs to use the data table created by trendStudy. Both set of scripts are working.

I want to have these two scripts built into a JMP add-in in the following way.

  1. When the add-in is started, a small floating window (always visible) appears with two click button boxes showing [Run trendStudy (Trend Plots)] and below it [Run corrStudy (Correlation Study)].
  2. Clicking on Run trendStudy button box only runs the trendStudy (and associated scripts) producing a trend chart and data table.
  3. Clicking on corrStudy button box runs corrStudy (and associated scripts) to produce the correlation study plots.
  4. corrStudy does not run if trendStudy has not been run and throws a warning "Run trendStudy first!"
  5. Closing the add-in window closes all open data-tables and chart windows with a warning such as "This will close all open tables and charts"

How to build such a JMP add in (I am especially struggling to understand how to separate the two trendStudy and corrStudy)?

When it's too good to be true, it's neither
2 REPLIES 2
txnelson
Super User

Re: How to construct a JMP add-in to run a floating window with click boxes for different sequentially dependent scripts?

Here is an example of the structure to use to run one script or another

txnelson_0-1687362094654.png

Names Default To Here( 1 );
New Window( "Example",
	Button Box( "Run trend Study", Print( "Place the trend study script here" ) ),
	Button Box( "Run corrStudyStudy", Print( "Place the corrStudy script here" ) )
);
Jim
jthi
Super User

Re: How to construct a JMP add-in to run a floating window with click boxes for different sequentially dependent scripts?

In addition to what @txnelson  suggested, you can control the activity of a button with << Enabled(0|1)

Names Default To Here(1);
New Window("Example",
	Button Box("Run trend Study", Print("Place the trend study script here")),
	Button Box("Run corrStudyStudy", Print("Place the corrStudy script here"), <<Enabled(0))
);

How to close all tables / graphs / windows and how to pass correct tables to corrStudy depends on how you have built your main scripts

-Jarmo