Subscribe Bookmark RSS Feed

JSL - script within a project

hardner

Community Trekker

Joined:

Nov 13, 2012

I'm just getting starting trying to script projects.

If I put a script into a project can it know what project it's in?

(similar to how I can embed identical JSL in many different journals but use CurrentJournal in the script to cause it to refer to the journal that it is in?

A little more detail:

My goal is use JSL to automatically create a folder for each of a continuously appearing stream of "widgets",  to update the folder contents with different files of data about the widget as they become available and to embed scripts to make reports and perform other functions that will be specific to this widget.  The folder would be a one stop shop for info on the widget.    I'm considering making this a Project, or making a project for each widget that contains links to "everything", so that users can open one thing in JMP and get a convenient view of "everything" associated with the widget.  but I'm just starting to explore what it's like to script Projects and how they behave. My specific question is whether I need to modify the scripts the project will contain each time I store them to a new Project for a new widget - for example to hardcode a widget name or file path to use each time or is there a way that when these scripts are run from inside the project they can know what project they are being opened from within and use that to identify the widget name, filepath and filenames that are associated with "this" project?