Extracting JSL code from a journalHello!
Does anyone know how to ‘extract’ the JSL code of a given journal? It would be very useful to learn how to write JSL codes that generate reports/journals.
For example suppose you create a journal by adding text, file reference etc.. You want to save the script that would generate that journal. Is that possible?
Many thanks,
Marcello.
Re: Extracting the JSL code of a journal<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hello Craig,
Thank you very much for your clear explanation of how journals work in JMP. I am creating an add-in and I wanted to learn how to write the jsl code that makes the text appear on two columns. From your response to my other question I solved the problem.
Marcello.
Da: Craige@JMP
Inviato: mercoledì 12 agosto 2015 20.50
A: Marcello Fidaleo
Oggetto: Re: - Extracting the JSL code of a journal
<> JMP User Community
Extracting the JSL code of a journal
reply from Craige@JMP <> in Discussions - View the full discussion <>
Re: Extracting the JSL code of a journalJournals created from JMP platforms do have a copy of the script would reproduce the platform if the data table was available. But journals created from your own scripts (like the earlier example) do not contain a copy of the script that made the journal. But a journal with buttons that run scripts does contain the button scripts.
The original purpose of a journal was to keep a record of the results of running a platform. Mostly the journal is a set of instructions (not JSL) for rebuilding the appearance of the platform without re-running the platform.
But because the platform's red-triangle menu is saved to the journal, the script for re-running the platform is in the journal.
What do you want to do? I think there is a better approach than "undoing" a journal, but I'm unclear on the goal.
Re: Extracting the JSL code of a journalThank you for you quick response. Suppose I have the journal corresponding to the jsl reported below and I save it as a jrn file. Can I get the jsl code starting from the jrn file? From an open report I can generate the jsl code that produces that report so I was wondering if that is possible also for an open journal. I think my view is too simplistic!! I am starting up with jsl.
Many thanks.
Da: Craige@JMP
Inviato: mercoledì 12 agosto 2015 19.02
A: Marcello Fidaleo
Oggetto: Re: - Extracting the JSL code of a journal
<> JMP User Community
Extracting the JSL code of a journal
reply from Craige@JMP <> in Discussions - View the full discussion <>
Re: Extracting the JSL code of a journalOr maybe you don't want a journal at all. You can also build complicated displays in a new window.
From the scripting index, this display only has one item:
g = Graph Box(
Frame Size( 300, 300 ),
Marker( Marker State( 3 ), [11 44 77], [75 25 50] );
Pen Color( "Blue" );
Line( [10 30 70], [88 22 44] );
);
New Window( "My Window's Title", g );
Re: Extracting the JSL code of a journalSounds like you want something like this:
x = Current Journal(); // makes a new journal if none open
x << append( // add to the end of the journal
Outline Box( "example",
V List Box( // the outline holds a vertical list of two items...
Text Box( "hello" ),
Button Box( "there", Print( "run some JSL" ) )
) ) );
JMP has both .JSL and .JRN files and the contents of them looks similar, but only the .JSL files really have executable script language. The .JRN files have a description of what the JMP output looked like when the journal was created by journalling a platform's output. Except, as you've noticed, journals sometimes have buttons that have scripts that run when the button is pressed.