Then, you use either the Send function or the equivalent << operator to send a message:
Adding Elements to a Report Using a Script
For row state messages, omitting the argument toggles the option: if the option is off, the message turns it on. If the option is on, the message turns it off. You can also use the "toggle", "switch", or "flip" keyword, as in r << Exclude( "toggle" ).
2.
In cases where the menu gives several options separated by comma or slash, as in the case of Means/Anova/t Test above, you can use any one of the commands. In cases where several commands have the same alias, as in the two cases of “Means” above, the first one takes precedence in the scripting language.
4.
5.
If there are submenus whose items are values for a setting rather than independent commands, then in script, you give the parent item with the submenu choice as its argument. For example, Oneway has a submenu for Set Alpha Level, whose choices are 0.10, 0.05, 0.01, and Other... To change the value in script, you give your choice as an argument to Set Alpha Level:
To send several messages, you can add more << operators or more Send arguments:
Because << is an eliding operator, it combines arguments and works differently than if its arguments were grouped. You can stack up multiple messages with extra << symbols to perform them all in order (left to right). You can use grouping parentheses to send a message to the result of sending a message:
3.
Go to the Help menu, select Scripting Index, find the object type that you are interested in, and click the item in the list.
4.
Show Properties(objectRef) lists to the Log window all messages the object can receive:
Notice that most items in the Show Properties output have hints inside brackets [ ] at the end of each line. This section examines the Show Properties for Bivariate as a general example.
[Subtable]s refer to a set of commands that are put in a submenu. The commands in the subtable are indented, and you use the subitem itself, not the parent item.
[Boolean]s turn an option on or off, and their arguments are usually 1 or 0. If specified without an argument, sending the message flips it to the opposite state. Frequently [Boolean] messages also indicate that they by [Default On].
[New Entity] is a command that leads to a new window in the user interface. Here’s an example from the Distribution object properties:
[Action]s are choices the user makes in the user interface. They do not have a specific standard for their arguments, so try the item in the interface first and then study the script that the platform saves.
[Action Choice]s and [Enum]s have a specific set of choices for their arguments.
Here’s an example of [Enum] in the Bubble Plot properties:
Confusion alert! Do not confuse a reference to a platform with a reference to a report. They are different types of objects and can receive different types of JSL messages. For example, platforms can do such things as run tests, draw plots, or close entire windows. Reports can do such things as copy pictures, select display boxes, or close outline nodes.