ralphtrent
Programmer
Can I access my dictionary object outside this function?
Function dict(file,state)
Dim dict1
z=0
set dict1 = CreateObject("scripting.dictionary"
call dict1.add(file,state)
For Each key In dict1
For Each item In dict1.keys
If dict1(key) = False Then WScript.Echo(key & " does NOT exsist and the Script can not continue"
:z=1
If dict1(key) = True Then WScript.Echo(key & " does exsist"
next
Next
If z=1 Then quit()
' If z = 0 Then install()
End Function
'I want to do something like this
wscript.echo dict.count
'but I get object required error.
Function dict(file,state)
Dim dict1
z=0
set dict1 = CreateObject("scripting.dictionary"
call dict1.add(file,state)
For Each key In dict1
For Each item In dict1.keys
If dict1(key) = False Then WScript.Echo(key & " does NOT exsist and the Script can not continue"
If dict1(key) = True Then WScript.Echo(key & " does exsist"
next
Next
If z=1 Then quit()
' If z = 0 Then install()
End Function
'I want to do something like this
wscript.echo dict.count
'but I get object required error.