Hi,
I have a group containing a number of check boxes. I would like to get a list of all those selected without having to hard code a list of the field names in my script. I was hoping for something along the lines of:
get the members of group "foo"
returning an array of each object in the group. I could then go through, check which ones were buttons and check their highlight etc
Is this possible? Any tips with the syntax?
Thanks,
Andrew
Enumerating the contents of a group
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 13
- Joined: Sun Dec 17, 2006 12:30 pm
If you use Mark's handlers found here: http://runrev.info/Objects%20list.htm you can easily
HTH
SparkOut
Code: Select all
get the objects of group "theGroupName"
SparkOut
How about something like
That would give you your array and you can take it from there.
Code: Select all
repeat with x=1 to the number of controls of group tGroup
if word 1 of the name of control x of group tGroup is "button" and the style of control x of group tGroup is "checkbox" then
put the id of control x of group tGroup into myArray[x]
end if
end repeat
-
- Posts: 13
- Joined: Sun Dec 17, 2006 12:30 pm
Re: Enumerating the contents of a group
Thanks, that worked.