This window is where the REXX script can use the SAY instruction to display any text. For example, assume that your script has the following instruction in it:
SAY "hello"When you run this script, then you should see the following in the Console window:
The text "hello" has been displayed, since that it what the instruction said to display. The text is a green color.
The Console window is also where the script uses a PULL instruction to get text from you. For example, assume that your script has the following instruction in it:
PULL MyVarWhen you run this script, then you should see a white, blinking cursor appear in the Console window as so:
This lets you type in a line of text (after which you usually have to press the ENTER key). This text is returned to the script to be used in its PULL instruction. For example, if you type the text This is some text and press ENTER, then the script's PULL instruction uses that text as the value of the variable named MyVar in the above example.
You'll notice that the Console window echoes the text you type in a color different than the SAY instruction uses. This is so that you can tell them apart (since both instructions use the Console window).
In fact, a script will typically use both the SAY and PULL instructions to display a prompt, and then get some text from the user. Here is an example of a script that asks the user to type his name (using the SAY instruction), then lets him type his name and assigns what he typed to the variable named Name.
SAY "Type your name (and then press ENTER) >" PULL NameAnd here is how the Console window would look if you ran the script and typed in John.
The Console window is useful for creating a very rudimentary user interface for your script. You can quickly and easily get input from the user, and display information. But for a script that requires a better user interface, then you should instead use some add-on library such as REXX GUI, rather than using the SAY and PULL instructions.
Note: The Console window automatically closes when a script does an EXIT or RETURN unless you have opened it prior to running the script.
Resizing the Console window
You can resize the Console window, or float it, or dock to any side of the main window, by manipulating it with the mouse, just like the Reference window.
When the Console window is docked, and you resize the main window itself, then the Console window is automatically resized appropriately.
You can hide the Console window by selecting "Console window" under the View menu.