Script Editor

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help
DIAdem 2020 SP1 Help

Use the script editor to write and edit scripts. Use the menu File»Change Syntax to specify which type of syntax the script editor supports. If you idle the mouse over the tab of the respective file, DIAdem shows whether the script is a DataPlugin or a DIAdem script. DIAdem saves the information whether a script is a DataPlugin in the Workspace.

Use the DIAdem SCRIPT recording mode to automatically record sequences in a script. In the recording mode, DIAdem does not generally record the assignment of values to program variables. Press <Ctrl-Shift-C> in a dialog box to record the assignment of values to program variables.

Use the watch area to record all the actions in DIAdem. You can use the watch area in the debug mode to check or edit the contents of variables, while the script is being executed. Use the dialog editor to define user dialog boxes.

The script editor offers the following functions for DIAdem scripts:

  • Use CodeCompletion for DIAdem identifiers. If you press <Ctrl-Spacebar>, DIAdem displays all the objects, commands, and procedures that are available in this context. If you type a dot behind the name of an object, DIAdem displays all properties and methods that this object supports. Select the methods and properties from this list to use them in the editor. DIAdem displays further information on the selected identifier in the SmartInfo.

Use the SmartInfo for information about DIAdem commands, variables, objects, properties, and methods. If you move the mouse across a DIAdem term or a DIAdem term from the CodeCompletion list, DIAdem displays the type, the parameters, and a short description in the SmartInfo. Click Display Help on This Subject in the SmartInfo to open the Help page. The displayed SmartInfo depends on the respective context. For example, DIAdem displays different SmartInfos for methods, which have the same names, but which are used in different object structures. DIAdem also displays the SmartInfo for user-defined variables to which DIAdem objects were assigned. If you can configure a command, a method, or a property, DIAdem displays the SmartInfo for the first parameter, after the opening parenthesis. DIAdem automatically displays SmartInfos on further parameters after you enter a comma. You can temporarily disable the SmartInfo display by pressing <Ctrl + Shift + T>. If you want to set the SmartInfo display permanently, select Properties from the context menu of the script editor.

  • Use the tracking function to recognize which parts of the script you have changed in the current work session. DIAdem marks changed areas you have not saved with a yellow bar at the left edge of the workspace. DIAdem marks changes that you have saved with a green bar.

  • Use shortcuts, for example, to start a script, to search for text and to select text, or to comment out lines.

  • Use breakpoints to stop a script in debug mode.

  • Use bookmarks to mark lines.

  • DIAdem displays a script structure of the current script. Use Collapse All Groups and Expand All Groups to obtain a shortened or a complete view of the script. Use Toggle Current Group to switch the current group.

  • Use the Go to Line dialog box to jump to a specific line.

  • Use the Find and Replace dialog box to find and replace text. You can use wildcards or regular expressions in the search.

  • Use Properties to specify the properties of the script editor. Use Colors to specify the colors for the various elements of a script, such as comments, commands, or variables.

The script editor has the following restrictions for DataPlugin scripts compared to DIAdem scripts:

  • You cannot set breakpoints in DataPlugins. You cannot execute DataPlugin scripts directly and you cannot debug the scripts. You cannot drag and drop an element from the Data Portal to a DataPlugin script. You cannot use user dialog boxes in DataPlugin scripts.
  • CodeCompletion only displays functions, objects, properties, and methods that are available in DataPlugins.
  • Use <F1> to call the DataPlugin Help.
Note  If you change the write protection of the file that is open in the script editor in a different application, press <F5> in the script editor.

Procedures

Assigning Scripts to Function Group Buttons | Creating a Script | Determining Data Set, Group, and Channel Properties with a Script | Executing a Script | Opening the Dialog Editor | Recording a Script

WAS THIS ARTICLE HELPFUL?

Not Helpful