Creating a script

Top  Previous  Next

The script area is used for editing and debugging scripts.  The Editor Options from the Options menu opens a 5 page properties dialog that allows the syntax highlighting, editor behaviour and fonts to be customized. An "auto-correct" and a "code template" facility are also provided.

 

 

Breakpoints can be set/unset by clicking in the gutter beside the line where the breakpoint is, as well as from the context menu. Breakpoints are shown by a red graphic with the letter B.

 

Bookmarks are shown by a green numbered graphic.

 

Project options such as breakpoints, bookmarks, icon file, executable target and so on are stored in a project file (.DSP) with the same path and name as the script source.

 

During single-step debugging, the command which is about to be executed is shown highlighted in the script window.  If an error is found during execution of a script, the line containing the error is highlighted when the DialogScript interpreter displays the error message.

 

The context menu provides a quick way to access many useful functions.

 

 

The menu is context sensitive.  You can place the cursor in the middle of a command or function and select Help at Cursor to call up the help page for that command or function from the menu.  Alternatively you can select some text with the mouse and then press Control + F1.  The command reference and function reference sections of the online help can be called up directly from the menu.

 

You can set breakpoints to halt the execution of a script by placing the cursor in the line at which you want execution to stop, right-clicking the mouse and selecting Add Breakpoint at Cursor from the menu. If you place the cursor on a breakpoint the option changes to Clear Breakpoint at Cursor.  You can also clear all breakpoints in one go.

 

You can also call up the dialog designer from the context menu, or by pressing F2.  To edit an existing dialog description, place the cursor in the first line of the DIALOG CREATE command before opening the editor.