[Intel Navigation Header]

    LANDesk(R) Management Suite v2.x: Addendum to Scripting Guide

    
    

    LANDESK(R) MANAGEMENT SUITE V2.X: ADDENDUM TO SCRIPTING GUIDE

    
       Contents:
    
    
    
       This document discusses issues commonly encountered with Scripting.  It 
    
       supplements the files in LANDesk(R) Management Suite's Readme Viewer.
    
    
    
       Dialogs:
    
    
    
       The scripting guide does not discuss how to add functionality to the
    
       dialog boxes.  They can be made to execute code when text boxes are
    
       modified, buttons are clicked, selections are made, etc.  This is done
    
       by specifying the name of a function for the last parameter of the Begin
    
       Dialog statement.  The function by the same name is then called when
    
       actions are performed on the dialog.  The prototype of this function can
    
       be found in the online help by searching for "DlgProc (prototype)".  It
    
       discusses the parameters passed by the dialog to the function and how
    
       the code can decide what the user is doing.
    
    
    
       There are also several functions and statements in BasicScript that
    
       allow the code to extract information from the dialog and to change
    
       values and information on it.  These include the following:
    
    
    
       DlgControlId
    
       DlgEnable
    
       DlgFocus
    
       DlgListBoxArray
    
       DlgSetPicture
    
       DlgText
    
       DlgValue
    
       DlgVisible
    
    
    
       All of these except DlgValue are discussed in the online help.  DlgValue
    
       is discussed below:
    
    
    
       DlgValue (statement)
    
    
    
       Syntax         DlgValue  ControlName$, Value%
    
    
    
                 DlgValue  ControlIndex%, Value%
    
    
    
       Description    This statement changes the value of the given control.
    
    
    
       Comments  The value of any given control depends on its type according
    
       to the following table:
    
    
    
       Control Type
    
       Description of Value
    
    
    
       Option group
    
       The index of the new selected option button within the group (0 is the
    
       first option button, 1 is the second, and so on)
    
    
    
       List box
    
       The index of the new selected item
    
    
    
       Drop list box
    
       The index of the new selected item
    
    
    
       Check box
    
       1 if the check box is to be checked
    
       0 to remove the check
    
    
    
       A runtime error is generated if DlgValue is used with controls other
    
       than those listed in the above table.
    
    
    
       Example: The following code fragment toggles the value of a check box
    
    
    
       If DlgValue("MyCheckBox") = 1 Then
    
            DlgValue "MyCheckBox", 0
    
       Else
    
            DlgValue "MyCheckBox", 1
    
       End If
    
    
    
       Platform(s)    Windows*, DOS, Win32
    
    
    
       Scripting Guide Errors
    
    
    
       p.68: change lines 11- 13 in the sample code to read as follows:
    
    
    
            For i = 0 To count - 1
    
    
    
                 list(i) = ToolList.Name(i)
    
    
    
            Next I
    
    
    
       p.124 and p.127: Most tools have a Reports object.  In the case of
    
       Software Metering (LDMeter), this object is named Report, not Reports. 
    
       This may be changed to conform with the other tools in future versions.
    
    
    
       pp.131-151: All of the sample code listings which contain a line similar
    
       to
    
    
    
            Set suite = meter.Suites.("LANDesk Management Suite") 
    
    
    
            This is incorrect. Remove the period removed before the parenthesis
    
       so that they read similar to the following:
    
    
    
            Set suite = meter.Suites("LANDesk Management Suite") 
    
    

    Trademark information