cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
swaiper
Level II

Auto-launch jmp App

Hi,

I create a short JMP App to generate graphs. I need to launch this app whithout start the jmp home window (like creating an executable file).

If I use a script (.jsl), I can launch it from a batch file like this :

start "C:\Program Files (x86)\SAS\JMPSW\12\jmp.exe" "C:\Users\sdgf\Desktop\JMP\Premiers essais\try.jsl"

Buy adding "//!" in the scope of the script.

But impossible to do the same thing with a jmp app (.jmpappsource).

How can I do this?

Thank you in advance for your answers.

Romain

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Auto-launch jmp App

I think the .jmpapp detail in Peter's response is the important part here.

When you save the JMP application by default you get a .jmpappsource file, which invokes the editor when opened.  If you use Save As (Win) or Export (Mac) to save a .jmpapp file, the application will run when opened.  I don't think you will need a bat file or jsl wrapper in this case.

View solution in original post

4 REPLIES 4
pmroz
Super User

Re: Auto-launch jmp App

Might be a more direct way, but this works.  Put the following code into try.jsl.  Note the .jmpapp extension.

//!

// above line means just run the program

jmp_app_program = "c:\temp\My Great Program.jmpapp";

open(jmp_app_program);


Re: Auto-launch jmp App

I think the .jmpapp detail in Peter's response is the important part here.

When you save the JMP application by default you get a .jmpappsource file, which invokes the editor when opened.  If you use Save As (Win) or Export (Mac) to save a .jmpapp file, the application will run when opened.  I don't think you will need a bat file or jsl wrapper in this case.

swaiper
Level II

Re: Auto-launch jmp App

Thank you, this is working fine. DanSchikore

Working too, but not realy the best solution in my case. PMroz

hogi
Level XI

Re: Auto-launch jmp App

Another way: add << run at the end of the code in the .jmpappsource file.

 

I like @pmroz approach to use the helper jsl code open(application.jmpapp) 
This also solves my riddle how to include a jmp application the easiest way in a Jmp Add-In ... without hickups!

 

 

<jm:action type="text">open("$ADDIN_HOME(AddIn name)\Application.jmpapp")</jm:action>

 

 

Alternatives solutions:

  • link the .jmpappsource file in the .jmpcust Add-In definition file
    <jm:action type="path">$ADDIN_HOME(AddIn name)\Application.jmpappsource</jm:action>
    (and add << run at the end of the code)
  • link the .jmpapp file in the .jmpcust Add-In definition file
    <jm:action type="path">$ADDIN_HOME(AddIn name)\Application.jmpapp</jm:action>
    (and add << run at the end of the code *)

Both alternatives are dangerous, because after every edit of the code the << run has to be added again manually.


*) without the << run at the end, even with .jmpapp file type no application is opened;
On the other hand: with the << run at the end of the code, you will get 2 applications when you open the application directly via the .jmpapp file