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
ARETI052
Level III

Call another script without hard coding

Hi,

I was using Include() function to call other scripts from the main script, since the argument inside Include() is the hard coded script file path, my scripts won't be able to run on other people's laptops, is there any way to not hard code the argument?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Call another script without hard coding

Where is the main file located? Where are the other files located? If you are in same folder you can just use Include("filename.jsl").

 

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Call another script without hard coding

Where is the main file located? Where are the other files located? If you are in same folder you can just use Include("filename.jsl").

 

 

-Jarmo
pmroz
Super User

Re: Call another script without hard coding

If you make all of your scripts part of an addin, you can use syntax like this:

 

include("$ADDIN_HOME(com.cmpny.dept.myapp)\My Favorite Script.jsl");

You would define your addin with the alias com.cmpny.dept.myapp.  Here's a sample addin.def file that defines it:

id=com.cmpny.dept.myapp
name="My great application"
host=Win
home="M:\mydept\myapp\Addin"

This addin is located in a fileshare mapped as the M drive.