Show, Print, and Write put messages in the log window. Speak, Caption, Beep, and StatusMsg provide ways to say something to a viewer. Mail can send an e-mail alert to a process operator.
Tip: To preserve locale-specific numeric formatting in Show, Print, or Write output, include <<Use Locale(1).
Show displays the items that you specify in the log. Notice that when you show variables, the resulting message is the variable name, a colon :, and its current value.
Print sends the message that you specify to the log. Print is the same as Show except that it prints only the value of each variable without the variable name and colon.
Write sends the message that you specify to the log. Write is the same as Print except that it suppresses the quotation marks around the text string, and it does not start on a new line unless you include a return character yourself with the \!N escape sequence.
The sequence \!N inserts the line breaking characters that are appropriate for the host environment. For an explanation of the three line breaking escape sequences, see Double Quotes in JSL Building Blocks.
Beep causes the user’s computer to make an alert sound.
Speak reads text aloud. On Macintosh, Speak has one Boolean option, Wait, to specify whether JMP should wait for speaking to finish before proceeding with the next step. The default is not to wait, and you need to issue Wait(1) each time. For example, here is a script certain to drive anybody crazy. With Wait(1), you probably want to interrupt execution before too long. If you change it to Wait(0), the iterations proceed faster than the speaking possibly can and the result sounds strange. On Windows, you can use a Wait(n) command to accomplish the same effect.
Caption brings up a small window with a message to the viewer. Captions are a way to annotate demonstrations without adding superfluous objects to results windows. The first argument is an optional {h,v} screen location given in pixels from the upper left; the second argument is the text for the window. If the location argument is omitted, windows appear in the upper left corner.
You can include pauses in the playback by including the named argument Delayed and a time in seconds. Such a setting causes that caption and all subsequent caption windows to be delayed by that number of seconds, until a different Delayed setting is issued in a Caption statement. Use Delayed(0) to stop delaying altogether.
The Spoken option causes captions to be read aloud by the operating system’s speech system (if available). Spoken takes a Boolean argument, and the current setting (on or off) remains in effect until switched by another Caption statement that includes a Spoken setting.
Each new Caption hides the previous one. In other words, there is only one caption window available at a time. To close a caption without displaying a new one, use the named argument Remove.
Mail sends an e-mail message to a user. For example, a process control manager might include a test alert script in a control chart to trigger an e-mail warning to her pager:
Mail can also send an attachment with the e-mail. An optional fourth argument specifies the attachment. The attachment is transferred in binary format after its existence on the disk is verified. For example, to attach the Big Class.jmp data table, submit
On Macintosh, Mail() works on Mountain Lion and Mavericks. On Mountain Lion, you must enter the e-mail address and subject in the e-mail due to operating system limitations. Click the Send message button to send the e-mail.
On Windows, the bitness of JMP and the e-mail client must match. For example, Mail() does not work in JMP 32-bit with Microsoft Outlook 64-bit.