About WinStudio script editor options

The WinStudio script editor provides a number of miscellaneous options to control the compiling of script and the appearance of the code text in the editing frame. Many of these options are available from the Options tab, and some are available from the Script menu.

Options tab

These options are available on the Options tab, which is accessible at the far right of the script editor:

  • Compile/Save options:
    • Compile for Debug: When selected, this option allows you to build the current script in debug mode.

      When this option is selected and the Script menu Debug option is selected, the script is built into the debug AppDomain. If the build is successful, then the WinStudio script editor closes and Visual Studio opens a modeless session with the same script. This allows you to set break points, attach the script back to the WinStudio process, and step through the code in debug mode.

      注意: To use this option, you must have Visual Studio installed and operative in your development environment.
    • Compile source on OK: When selected (default), this option causes the script code to automatically be compiled when you click OK, before the script editor closes.

      If you have this option selected, you cannot close the WinStudio script editor until all errors have been resolved. To close the script editor without resolving errors, clear this option, and then click OK.

    Additional compile options are available on the Script menu.

  • Font options:
    • Name: From the drop-down list, select the font tamily to use for the script code.
    • Size: Specify the size, in points, for the script code font.
    注意: Below the Options panel, there is also a slider you can use to control the display size of the code in the Script panel.
  • Whitespaces options:
    • Convert Tabs to Spaces: When selected (default), pressing the Tab key automatically converts the tab character to the number of space characters specified in the Tab size field.

      When cleared, the Tab key moves the indicated number of spaces but does not convert the tab character to space characters.

    • Tab size: This option specifies how far the Tab key indents the code cursor.

      To increase/decrease the number of spaces, click and drag the slider indicator or click the slider bar.

Script menu options

The Script menu has two options:

  • Compile: This option compiles the code being developed.

    Use this option when you want to compile the code without closing the script editor.

  • Debug: This option compiles the code in debug mode.

    This option is enabled only if the Compile for Debug option is selected on the Options tab.

    If the code compiles successfully, then the WinStudio script editor closes, and Visual Studio opens a modeless session with the same script. This allows you to set break points, attach them to the WinStudio process, and step through the code for troubleshooting/debugging.

    注意: To use this option, you must have Visual Studio installed and operative in your development environment.
相关主题