如何使用AppleScript从xcode项目中删除组

时间:2009-08-13 21:31:04

标签: applescript

我已成功设法使用AppleScript将文件添加到组中,但我还需要能够删除子组。 我想像

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

但它告诉我该容器不支持删除。 有什么想法吗?

2 个答案:

答案 0 :(得分:2)

这可以通过以下方式实现:

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

答案 1 :(得分:0)

我明白了。要删除组中的所有组,我可以

删除currentGroup的组

我不确定如何删除一个组。

相关问题