Demonstration script that verifies the existence of a particular key within a Script Runtime Dictionary. Script must be run on the local computer.
Set oDictionary = CreateObject("Scripting.Dictionary")
oDictionary.Add "Printer 1", "Printing"
oDictionary.Add "Printer 2", "Offline"
oDictionary.Add "Printer 3", "Printing"
If oDictionary.Exists("Printer 4") Then
Print "Printer 4 is in the Dictionary."
Else
Print "Printer 4 is not in the Dictionary."
End If
Posted in Dictionary Objects


daniva




Recent Comments