Scripting

BRAIN comes with a built-in script editor that allows you to create scripts that are bound to commands. Once you have created a script, you can then execute that script simply by typing (or saying) the command.

For example, you might have a script called "Alarm Clock", which instructs your robot to wake you up each morning. When ever you wish to run the alarm script, you simply type or say Alarm Clock, and your robot faithfully executes the script. q

  • Scripts can be as simple as one line, or can be complex, nested scripts that extract information from the Internet in order to make decisions.
  • Scripts can be used to control the navigation of the Robot, speak, and more.
  • Scripts can contains loops, variables, if-then-else statements etc.
  • Multiple scripts can run concurrently. This allows you for example, to keep an eye on stock, while checking the weather, reading email, etc.
  • Scripts can be paused, stopped, resumed and restarted.

Like any scripting language, scripts are constructed using a pre-defined list of keywords. To see the complete list of keywords, see the keywords section.

Script creation is accessed via BRAIN' Commands menu:

page9_1


Creating a script is as simple as specifying the command to bind the script to, entering the script detail, and clicking save.

page9_2

Once the command is created, you can run the script by typing the command in the Robot Commands panel:

page9_3


Or selecting it from the Commands menu:

page9_4


BRAIN comes with a few basic scripts to get you started in your scripting. To see these scripts, enter the Command window, select the script from the command menu, and the corresponding script will be displayed.