Subscribe Bookmark RSS Feed

Open an extra journal from script on mac (Windows: Main Menu("File:New:Journal") )

pauldeen

Community Trekker

Joined:

Oct 24, 2014

On the windows version of my script I use the command:

main menu("File:New:Journal") 

this opens up an extra journal and allows me to control what goes in each journal. I'm looking for the equivalent command for the Mac platform since one of my testers tells me the script doesn't run and this is the output I get:

Command is not recognized{1} in access or evaluation of 'Main Menu' , Main Menu( "File:New:Journal" )
1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp

Staff

Joined:

Jun 23, 2011

Solution

FWIW (with JMP 13 on the Mac), this works:

main menu("File:New:New Journal") 

Also 'Help > Scripting Index' is your friend. It revals that you can do things like this:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sample = Distribution( Y( :height ) );
sampjourn = sample << Get Journal;
New Window( "Distribution of Height",
	Text Box(
		"Here is the result of the distribution platform for Height."
	),
	Journal Box( sampjourn )

 

4 REPLIES
ian_jmp

Staff

Joined:

Jun 23, 2011

Solution

FWIW (with JMP 13 on the Mac), this works:

main menu("File:New:New Journal") 

Also 'Help > Scripting Index' is your friend. It revals that you can do things like this:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sample = Distribution( Y( :height ) );
sampjourn = sample << Get Journal;
New Window( "Distribution of Height",
	Text Box(
		"Here is the result of the distribution platform for Height."
	),
	Journal Box( sampjourn )

 

pauldeen

Community Trekker

Joined:

Oct 24, 2014

Thanks, your first line solves my problem.

It would be nice if this worked but unfortunatly you don't seem to be able to get the journal for a data table:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sample = Distribution( Y( :height ) );
sampjourn = sample << Get Journal;
dtjourn = dt << Get Journal;
New Window( "Distribution of Height",
	Outline Box(
		"Here is the result of the distribution platform for Height.",
	v list box(Journal Box( sampjourn ),Journal Box( dtjourn ))
);

Any ideas how to solve that one?

ian_jmp

Staff

Joined:

Jun 23, 2011

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sample = Distribution( Y( :height ) );
sampjourn = sample << Get Journal;
New Window( "Distribution of Height",
	Outline Box( "Here is the result of the distribution platform for Height.",
		Data Table Box( dt ),
		Journal Box( sampjourn )
	)
);
pauldeen

Community Trekker

Joined:

Oct 24, 2014

Unfortunatly the data table box does not transfer value colors or color coding on prob values. I use these to highlight conclusions (see attached). My current solution is to push the data table into a fresh journal (hence the original problem statement), steal that journals' code and add that to a journalbox in my outlinebox hierarchy in the main journal but that doesn't work on Mac. Is there a way to make the journal box copy the colors from the table?