Jump to content

Recommended Posts

Posted

hi gang,

I would like to pick out a specific item from a collection.

I tried the emum items capability and it works fine, i.e.,

For $Match In $Matches ; (for each) loop through the $Matches collection

...

Next

To go one step further, in vbScript, it is possible to pick out

an individual item like this:

$Matches(1).Value

That is vbs shorthand for specifying a specific item like this:

$Matches.Item(1).Value

Both of these syntaxes work in vbs, but I couldn't get either

to work in au3b.

Note: I also tried square brackets, which didn't work either.

Am I missing something, or is it not possible to address an

individual item in a collection???

tiafah, jw

Posted

hi gang,

I would like to pick out a specific item from a collection.

I tried the emum items capability and it works fine, i.e.,

For $Match In $Matches ; (for each) loop through the $Matches collection

...

Next

To go one step further, in vbScript, it is possible to pick out

an individual item like this:

$Matches(1).Value

That is vbs shorthand for specifying a specific item like this:

$Matches.Item(1).Value

Both of these syntaxes work in vbs, but I couldn't get either

to work in au3b.

Note: I also tried square brackets, which didn't work either.

Am I missing something, or is it not possible to address an

individual item in a collection???

tiafah, jw

personally i don't use collections much, i prefer arrays....you could easily create an array and add the items of the collection to the array, so that they could be referenced by index.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...