The JSL from your latest response creates a Window Object display box with a variable named "nw2" that is used to allow one to reference that display box. The default action of a Window Object is to create a new display window
nw2 = New Window( "New window",
Inside the Window Object a Button Box Display Box with the name, "Test" and a script, "Print("test")". with a variable named "OutputGButton" that is used to reference the Button Box.
outputGButton = Button Box( "Test", print("test");
)
The next object within the Window Object is the JSL to run a Bivariate Platform, with a variable named "biv" that is used to reference the Bivariate Platform object. The default action of the Bivariate Platform is to run a Bivariate analyses and to display the output in either a new window or in this instance to display the output within the nw2 window object. 2 elements are passed to the Bivariate Platform. The column weight is passed to the Y element, and the column height is passed to the X element
biv = Bivariate( y( :weight ), x( :height ) )
At this point in the JSL, the definition of the nw2 window object is completed the a closing ")"
I am going into this level of detail in order to illustrate how the next lines within the script interact with the nw2 window object or with one of the objects within the nw2 window object.
Each of the defined object have messages that can be passed to them. Different types of objects have a different list of messages that can be passed to them. The nw2 window object has messages such as "Set Window Title", "Bring Window To Front", "Close Window" etc. The complete list of messages that can be sent to a window object are listed in the Scripting Index
![txnelson_0-1724851370487.png txnelson_0-1724851370487.png](/t5/image/serverpage/image-id/67612iBD49F63F9BDD3551/image-dimensions/823x576?v=v2)
in the current script
nw2 << Save ByGroup Script to Journal;
it has the "Save ByGroup Script to Journal" message being passed to the nw2 window object. However, that message is not a message available to a window object.
Save ByGroup Script to Journal is a message that is available to JMP Platforms.
The only object in the script that this message can be passed to is the Bivariate platform referenced by the biv variable
biv << Save ByGroup Script to Journal;
However, when this is the way it is used, the script that is passed to the journal only contains the JSL to run the Bivariate, not the script to run the full JSL that creates the window object with it's button box and Bivariate platform.
So what will need to be done, is to write the JSL that places into a journal a button box that contains all of the JSL that is currently in the definition of the nw2 window object.
I have run out of time to work on this issue. I will try to get back to it later in my day.
Jim