In my VBA code i'm using the following:
Dim docsToSave As Scripting.Dictionary
Set docsToSave = New Scripting.Dictionary
Dim toRemove As Collection
Set toRemove = New Collection
...
More Code
...
For i = 1 To toRemove.Count
docsToSave.Remove (toRemove.Item(i))
Next
The nice thing about Collections compared to Dictionaries is that you can retrieve keys by using their item numbers.
My problem is that I need to convert my VBA-code to CATScript (similar to VBScript).
I don't think it's easy to get a code as simple as the above for subtracting one list of "key, item" from another list.
What's the best way to fix my code so that it works in CAT/VB-Script?
I believe it may be possible with an Array, since I'm very new at coding in general I figured I'd ask here first for a better way before I try to make it work with Arrays.
Edit:
This question differs from CATIA VBA Enable use of “Scripting.Dictionary” in .CATScript because this question specifically requests information on how to use a dictionary in VBScript so that it would replicate the behaviour of a Collection used in an existing VBA-script.