Script editor

The script editor allows editing the main script or child scripts (see here for acknowledgments and credits related to Scintilla, the text editing library that the script editor is based on). It is opened by double-clicking a script in the script dialog, or by double-clicking the script icon next to an object in the scene hierarchy.

[Script editor]


The script editor has auto-completion, call tips and syntax highlighting features that make code edition easier. V-REP commands can easily be accessed by typing the first 3 letters (usually "sim"). The correct API function or command can then easily be located as can be seen in following figure:

[auto-completion command list]


Opening a function parenthesis displays call tips for the current command or function:

[call tips]


Copy/paste and undo/redo functionality of the script editor is supported through a popup menu (right-click). When a script was modified, there is no need to explicitly save the changes: closing the script editor, saving the scene or starting a simulation will automatically apply the changes to the script. When a simulation is running, modifications to a given script will only have an effect once a new simulation run is started.

In order to be able to easily recognize the type of script opened, the background of the window will be slightly colored red for main scripts, cyan for threaded child scripts, and grey for non-threaded child scripts:

[Main script, threaded child script and non-threaded child script]


If you wish to use a particular editor to edit V-REP's embedded scripts, then refer to the entry externalScriptEditor in the user settings file system/usrset.txt


Recommended topics

  • Scripts
  • Script dialog