DIAdem SCRIPT
- Updated2024-09-12
- 2 minute(s) read
DIAdem SCRIPT
DIAdem SCRIPT
Use DIAdem SCRIPT to generate, edit, execute, and monitor VBS scripts or Python scripts. You can generate scripts automatically by recording steps that you execute interactively in the recording mode. In the dialog editor you can generate your own dialog boxes, which you integrate into a script. You can also open Python files in an external Python IDE through the menu or the toolbar if you have specified the path to the Python IDE in the Settings dialog box. DIAdem SCRIPT contains the following areas:
-
Use the File»New, File»New VBS, or File»New Python menu to create new scripts.
-
Use the script editor to enter and edit scripts. Tooltips provide information about the commands and variables. <F1> accesses the help for a selected command or variable. Use CodeCompletion for information about DIAdem commands, objects, methods, and properties. If you press <Ctrl-Spacebar>, DIAdem displays all the objects, commands, and procedures that are available at this point in the script. If you type a dot behind the name of an object, DIAdem displays all properties and methods that this object supports. You can select the methods and properties from this list to use them in the editor. Use shortcuts, for example, to start a script, to search for text and to select text, or to comment out lines.
-
Use a debugger to work through VBS scripts step by step and to search for errors. You can use the watch area in the debug mode to check or edit the contents of variables while the script is being executed. The debugger integrated in DIAdem does not support the debugging of user dialog boxes, DataPlugins, and the debugging of Python scripts. For this you need an external debugger. You can debug VBS scripts, dialog boxes, and VBS DataPlugins, for example, with the Visual Studio debugger. For example, you can debug Python scripts with the Visual Studio Code debugger. Click Use External Debugger on the toolbar of DIAdem SCRIPT. DIAdem then disables internal debugging and enables external debugging. If you start Python scripts and have enabled external debugging, DIAdem does not execute the scripts until you have connected the external debugger.
-
Use the dialog editor to define user dialog boxes. In user dialog boxes, you can make entries and select various options, while a DIAdem script is running. Unlike the standard dialog boxes, for example message display, you can design user dialog boxes to meet your own requirements. DIAdem saves user dialog boxes in SUD files. Use the commands SUDDlgShow or SudDlgCreate to call user dialog boxes in DIAdem scripts. Use DIAdem variables to connect user dialog boxes to DIAdem, to make default settings in the user dialog box or to process the return values.
- Use the File»Change Syntax menu to specify which type of syntax the script editor for VBS files supports. In contrast to DIAdem scripts, the script editor has restrictions for VBS DataPlugin scripts: In VBS DataPlugin scripts, you cannot set breakpoints, execute the scripts directly, or debug the scripts. You cannot drag items from the Data Portal into a VBS DataPlugin script, and you cannot use user dialog boxes in DataPlugin scripts.