I'm trying to group all the controls that are on a card within a script. On the card there could be any number of labels, buttons, etc--basically anything that can be grouped. I iterate through the controls of the card, and append the name of each to a string called allcardcontrols, and then try to group them via these lines:
Code: Select all
repeat with x =1 to the number of controls of this card
put the name of control x of this card && "and " after allcardcontrols
end repeat
delete the last word of allcardcontrols
group allcardcontrolsallcardcontrols contains the appropriate text to meet the requirements for the objectlist of the group command
(in my case--allcardcontrols: button "Button" and field "FY100" and graphic "Rectangle")
the command: group allcardcontrols <<does not work,
but the command: group button "Button" and field "FY100" and graphic "Rectangle" <<does work.
how do I get the script to use the content of the variable allcardcontrols with the group command?