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
AY
AY
Level II

call .exe, let it run and open another .jsl after .exe closed

Hi. I want to run my .exe application using JMP script and after .exe closed, I want my JMP script to execute another script sequentially. Right now, if i run my code, both .exe and .jsl run at the same time. I need output from .exe as an input to my .jsl which is why I need .exe to finish running first. Below is my code. Anyone can help me? 

 

 

Open("C:\GetICOS_CSVs.exe");
include("C:\ICOS_Data Pull\CombineCSVs_Split_By_UnitID.jsl");

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: call .exe, let it run and open another .jsl after .exe closed

Rather than using the OPEN() command to run your .exe, take a look at using Run Program()

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: call .exe, let it run and open another .jsl after .exe closed

Rather than using the OPEN() command to run your .exe, take a look at using Run Program()

Jim
AY
AY
Level II

Re: call .exe, let it run and open another .jsl after .exe closed

Hi @txnelson ,

 

I tried using RunProgram(). It work as what I want. But somehow, when I try using it with my add-in, it prompt me this error : 

 

"CreateProcess failed with error 2: The system cannot find the file specified"

 

I don't know what is wrong and how to solve this problem. Below is current code that I use:

 

mcr = RunProgram(Executable("$ADDIN_HOME(com.jmp.matlabinjmp)/Get_CSVs_19.exe"),
Read Function("blob"));

// call another .jsl to concatenate table
include("$ADDIN_HOME(com.jmp.matlabinjmp)/CombineCSVs_Split_By_UnitID.jsl");