VBScript Reference Manual for InduSoft Web Studio
VBScript Reference Manual for InduSoft Web Studio
VBScript Reference Manual for InduSoft Web Studio
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong> <strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong><br />
d.Add “b”, “New York”<br />
Msg = “key does not exist”<br />
if d.Exists (“b”) Then msg = “Key exists”<br />
MsgBox (Msg) ‘ Indicate if the key exists<br />
Method Items<br />
Description: Returns an array containing all the existing items in a Dictionary object<br />
Usage: Object.Items ()<br />
Arguments: None<br />
Return: Array containing all the existing items in the Dictionary object<br />
Example: Dim a, d<br />
Set d = CreateObject(“Scripting.Dictionary”)<br />
d.Add “a”, “Chicago”<br />
d.Add “b”, “New York<br />
a = d.Items<br />
For i = 0 to d.Count – 1<br />
s = s & a(i) & vbCrLf<br />
Next<br />
MsgBox s ‘ Display all the items<br />
Method Keys<br />
Description: Returns an array containing all the existing keys in a Dictionary object<br />
Usage: Object.Keys ()<br />
Arguments: None<br />
Return: Array containing all the existing keys in the Dictionary object<br />
Example: Dim a, d<br />
Set d = CreateObject(“Scripting.Dictionary”)<br />
d.Add “a”, “Chicago”<br />
d.Add “b”, “New York<br />
a = d.Keys<br />
For i = 0 to d.Count – 1<br />
s = s & a(i) & vbCrLf<br />
Next<br />
MsgBox s ‘ Display all the keys<br />
Method Remove<br />
Description: Removes a key, item pair from a Dictionary object<br />
Usage: Object.Remove (key)<br />
Arguments: key<br />
Required. Is the key associated with the key, item pair you want to remove<br />
from the Dictionary object<br />
Return: None<br />
Example: Dim a, d<br />
Set d = CreateObject(“Scripting.Dictionary”)<br />
d.Add “a”, “Chicago”<br />
d.Add “b”, “New York”<br />
d.Remove(“b”) ‘ Removes the “b, New York” key/item pair<br />
Method RemoveAll<br />
Description: Removes all key, item pairs from a Dictionary object<br />
Usage: Object.RemoveAll( )<br />
Arguments: None<br />
Return: None<br />
Example: Dim a, d<br />
Set d = CreateObject(“Scripting.Dictionary”)<br />
d.Add “a”, “Chicago”<br />
d.Add “b”, “New York”<br />
d.RemoveAll ‘ Removes all key/item pairs<br />
<strong>InduSoft</strong>, Ltd. 215