2009-08-13 71 views
1

我已经成功地使用AppleScript将文件添加到组,但我还需要能够删除子组。 我觉得像如何使用AppleScript从xcode项目中删除组

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 

,但它告诉我,删除不是由容器支持。 任何想法?

回答

0

我想通了。要删除所有组一组我可以做currentGroup

删除组我不知道我怎么会虽然只删除一个组。

2

这样可以通过例如以下来完成:

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