Remarks | Properties | Methods | DynProperties | Samples |
ED
|
avaliable
|
RT
|
read only
|
If several functions should be combined and be executed in the defined order (similar to a batch file), they can be entered into a script.
Count | Name | Parent |
Add | Item | Remove |
Name | Type | Description |
---|---|---|
Name | String |
Name Unique name of the script. Read more in the online manual
|
Sub zenOn_ScriptExample() '**************** Use this code in the editor **************** Dim zScript As Script Dim i As Integer 'Initialize the script object with the first script in the scripts object (list) Set zScript = MyWorkspace.ActiveDocument.Scripts.Item(0) 'If there is no script available (no script in the scripts object),... If zScript Is Nothing Then '...then inform the user MsgBox ("No Script available") 'otherwise: Else 'Output the name of the script Debug.Print "Scriptname: " & zScript.Name 'For every function in the script... For i = 0 To zScript.Count - 1 '...output the name of the function Debug.Print i + 1 & ". Function: " & zScript.Item(i).Name Next i 'Add the picSTART function to the script zScript.Add (MyWorkspace.ActiveDocument.RtFunctions.Item("picSTART").ID) 'Remove the picSTART function from the script zScript.Remove (MyWorkspace.ActiveDocument.RtFunctions.Item("picSTART").ID) End If End Sub