tags:

views:

55

answers:

2

I've successfully managed to add files to a group with AppleScript, but I also need to be able to remove a child group. I thought something like

tell currentGroup
    --remove any groups already present
    repeat with groupItem in groups
     --display alert " " & name of groupItem
     remove groupItem from groups

    end repeat
end tell

but it tells me that remove is not supported by that container. Any ideas?

A: 

I figured it out. To remove all groups in a group I can just do

delete groups of currentGroup

I'm not sure how I would remove just a single group though.

Ian1971
A: 

Such can be accomplished by for example the following:

tell application "Xcode"
tell front project
set parent_group to first group
delete first group of parent_group
end tell
end tell
Arutha