SoftBank Robotics documentation What's new in NAOqi 2.5?

Script editor panel

What is the Script editor panel

The Script editor panel enables to edit box scripts.

../../../_images/create_script_box_en.png

This editor integrates syntax highlighting to ease the edition.

At the bottom of the panel you can see the number of the selected line on the left and a field to search a specific keyword in the script.

How to open the script of a specific box

In the flow diagram, to open the script of any box, right-click on it and select Edit box script.

The script is displayed in the Script editor panel.

Note

For a Python box you can also double-click on it.

Script editor panel functionalities

Search functions

You have useful functions at the bottom of the panel:

Use ... To ...
../../../_images/find_menu_en.png Select the Find or the Replace function.

Search text field

../../../_images/chore_script_editor_find_en.png

Enter the string to search or search and replace in the current script.

It is highlighted in red if the keyword is not found in the script.

Navigation buttons

../../../_images/chore_script_editor_find_prevnext.png

Move to the previous or the next matching string:

Note

By default, the search wraps around the document: if you reach the bottom of the the script, it will start again from the top. This option can be disabled from the Setting button.

Setting button

../../../_images/chore_script_editor_find_settings.png

Specify search options:

  • Match case
  • Match whole word
  • Wrap around

Script editor functions

If you right-click in the panel, the following menu is displayed:

../../../_images/script-editor-context-menu_en.png

This contextual menu provides fast access to some classic functions for a script editor:

Command Function
Undo Revert last script modification.
Redo Apply previously reverted modification.
Cut, Copy, Paste or Delete Cut, copy, delete selected text block or paste text at the current location of editing cursor.
Select All Select the complete script.
Insert Function Insert a built-in function only available from a box script.
Block comment or uncomment Toggle the current line or the selected text block commented or uncommented.

Customizing Script editor panel

Several options are available in order to customize the Script editor panel:

  • Display mono-spaced font,
  • Display code folding buttons,
  • Display line numbers,
  • Wrap text.

For further details, see: Choregraphe preferences.