World Statistics Day was yesterday, but we’re celebrating all week long! This celebration means acknowledging the impact statistics has on our world. Who is your favorite statistician? Share with us who they are and why they top your favorites list.
Choose Language Hide Translation Bar
Highlighted
miguello
Level V

Central location for scripts?

I'd like to create central location for all scripts.

let's say I'd like to organize them as functions. And include files with functions as I write other scripts.

since I'll be working in different directories, is there any way to specify a central location, so each time I say Include(scripts.jsl) - it knows where to pick it up without writing a specific path? There is a predefined $SAMPLE_SCRIPTS variable - wher ecan I change or add to it?

Thanks!

2 REPLIES 2
Highlighted
ian_jmp
Staff

Re: Central location for scripts?

In 'Help > Scripting Index' try searching for 'set environment' and look at the example. See also. There's a 'Get Environment Variable()' too.

Highlighted
pmroz
Super User

Re: Central location for scripts?

I have several addins, each with their own folder.  Suppose you've defined an addin like this sample addin.def file:

id="com.cmpny.dept.myapp"

name="My Great Program"

autoload=1

home="M:\JMP\GreatApp\Addin"

This points your addin to the folder M:\JMP\GreatApp\Addin for all of the JSL files for this addin.  Then you can refer to it's location using the $ADDIN_HOME construct:

include("$ADDIN_HOME(com.cmpny.dept.myapp)\Great_Program.jsl");

Article Labels

    There are no labels assigned to this post.