Hi,
There is a way to run a script at start up. However, what should I do if I would like to run a script when exits JMP?
The following code is an idea for doing that, but it didn't work in JMP.
win=window("Home Window");
win<<on close(
new window("Goodbye :)",
<<modal,
text box("Thanks for using JMP")
)
);
Any thoughts are appreciated.
Best.
addin supports:
Click the Exit Script tab to add a script that runs when JMP exits or when you disable the add-in. You can select an existing script (Run JSL in this file) or copy and paste in a script (Run this JSL). For example, you could provide a prompt for the user to export a JMP data table upon exiting or disabling the add-in.
Here is a little script that works......the key is that one does not have access to the Home Window, but you can get the pointer to the overall JMP environment through << Top Parent. And it will remain viable as long as the window you go through stays available. So below is my solution to that.
x = New Window( " ");
win = Window( 1 ) << top parent;
x << show window(0);
win << on close(
New Window( "Goodbye :)", <<modal, Text Box( "Thanks for using JMP" ) );
quit("no save");
RunProgram( executable( "C:\Program Files\Windows Media Player\wmplayer.exe" ) );
);
Maybe someone else can come up with a better reference point to the top parent.
addin supports:
Click the Exit Script tab to add a script that runs when JMP exits or when you disable the add-in. You can select an existing script (Run JSL in this file) or copy and paste in a script (Run this JSL). For example, you could provide a prompt for the user to export a JMP data table upon exiting or disabling the add-in.