cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Elofar
Level II

Autorun a "Set preferences" script

Hello dear Community,

 

I spent lot of time to set-up my JMP preferences by changing the font size, aligning with corporate colors for the graphs etc ...

I would like now to create an auto-run script so that every employees of my company can quickly have the same preferences without having a heart attack by opening a JSL file  

 

Here's what I did:

- Got my preferences with "Get preferences (all)" as well as "Get Platform Preferences"

- I just copied/pasted that into a new script with "Set Preferences" and "Set Platform Preferences"

 

And here's what I would like:

- A way to auto-run the script when double-clicking on it (without the operator seeing the script, like closing right away)

- and even ideally, to display a message "Preference correctly installed" to confirm the set-up

 

Any idea how to do that ? 

 

PS: I'm working on Windows, JMP16

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Autorun a "Set preferences" script

Hi @Elofar ,

 

Try starting your script with //!, and at the end of your script include a window indicating it was successful.  That way if someone opens the file it will run automatically.  You can do all sorts of formatting to make the window look nicer, or you could launch the window first and ask the user if they want to adjust their preferences by including your script in a button box.

 

//!

//set preferences here

new window("Success", text box("It worked."));

 

 

View solution in original post

2 REPLIES 2
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Autorun a "Set preferences" script

Hi @Elofar ,

 

Try starting your script with //!, and at the end of your script include a window indicating it was successful.  That way if someone opens the file it will run automatically.  You can do all sorts of formatting to make the window look nicer, or you could launch the window first and ask the user if they want to adjust their preferences by including your script in a button box.

 

//!

//set preferences here

new window("Success", text box("It worked."));

 

 

Elofar
Level II

Re: Autorun a "Set preferences" script

Hi @ih,

 

I indeed found this "//!" trick before posting but it was not working, I just realized that it actually really needs to be on the very first line of the script and just adding a comment before will not work...

That is exactly what I needed with the window as well, brilliant, thanks a lot !!