Console Tab
Description
The console is used to display output from the scripts. It is sometimes useful to print output when creating scripts.
You can get access to the console from yours scripts by using one of the methods shown below.
To view/hide the 'Console Tab', go to the menu View -
Console or press Ctrl+9 to toggle between View and Hide.
How to
Create a new prototype. Add a 'Button' from the Palette - Controls.
Add an 'On Action' from the Palette - Events to your button.
You should have a 'Structure' like this.
From the Properties - Properties tab, select the combo box of the 'Script' property to open the scripting editor.
Copy the following code and paste it.
var console =
bsf.lookupBean ("console");
console.clear();
console.println("console.clear() remove content of Console.");
console.println("console.println() output a line in black color with a carriage return and new line");
console.println("console.print() output text in black color without a carriage return and new line");
console.errln("console.errln() output a line in red color with a carriage return and new line");
console.errln("console.err() output text in red color without a carriage return and new line");
console.warningln("console.warningln() output a line in blue color with a carriage return and new line");
console.warningln("console.warning() output text in blue color without a carriage return and new line");
console.traceln("console.traceln() output a line in grey color with a carriage return and new line");
console.traceln("console.trace() output text in grey color without a carriage return and new line");
You should have something like this.
Click the OK button.
Click the Run Prototype button
or press the key F5.
You should have something like this.
In the running prototype, press the 'Button'.
The output in your console should be identical to the image at the top of this page.