After the platform has been launched, there is a different syntax to send messages to control the live platform, using the Send function or its operator equivalent, <<.
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.
|
If there are submenus whose items represent commands rather than settings, then the corresponding script is the items themselves without the parent item. For example, above see that Oneway has a menu item Nonparametric with three commands in a submenu, including Wilcoxon Test. You would use just the subitem name in scripts, for example:
|
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:
|
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:
In this case, the associative grouping is of no consequence, because messages are performed left-to-right anyway. However, a case where it would matter is when sending messages to child objects, discussed next.
2.
|
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:
|
Show Properties also works with data tables and display boxes; see How Can I See All of the Messages that Can be Sent to a Data Table Object? in Data Tables and Learning What You Can Do with a Display Box in Display Trees.
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.
|