DIAdem Help

Command: ScriptStart

  • Updated2024-09-12
  • 3 minute(s) read

Display all  Hide all

Command: ScriptStart

Valid names: ScriptStart, VBSStart

Starts a VBS or Python script.

Call ScriptStart(FileDlgName, [VBSProcName], [AutoObjLetOpen])

Input Parameters

FileDlgName Specifies a file. You also can specify the path and the filename extension.
[VBSProcName] Specifies the name of a subroutine. By default the VBSProcName variable contains an empty text. For Python scripts, the command ignores this parameter.
[AutoObjLetOpen] For future extensions.
Note  When the ScriptStart command is called, DIAdem also executes the main section of the subscript and initializes the variables. The command then runs the specified subroutine.
Note  When the ScriptStart command is called, you cannot debug the routines, transfer parameters, or access the script variables. You can use only DIAdem variables or user variables to transfer values. Therefore, use the ScriptInclude command instead. If you use the ScriptInclude command instead of the ScriptStart command, you can speed up scripts.
Note  Use the ScriptInclude command instead of the ScriptStart command when you extend scripts. The following table describes the various application options. Call ScriptInclude only once at the beginning of a script. Do not call the ScriptInclude command in loops.
ScriptStart ScriptInclude 
  XWhen you use transfer parameters
  XWhen you use return values
  X When you debug calls in another script
  X When you use name spaces
  X When you use objects and variables from another script
X   When you start a script as program parameter
X   When you specify menus, buttons, and other controls to start a script
X   When you call scripts via OLE
X   When you cancel the started script or local error for this script

Related Topics

Command: ScriptInclude | Command: ScriptStatement | Command: SubSequence | Variable: ScriptFile | Variable: ScriptScope | Variable: Statement | Variable: SubSequenceText