1

我已经成功地使用 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

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

4

2 回答 2

2

这可以通过例如以下方式来实现:

tell application "Xcode"
tell front project
set parent_group to first group
delete first group of parent_group
end tell
end tell
于 2010-07-05T09:41:33.370 回答
0

我想到了。要删除组中的所有组,我可以这样做

删除 currentGroup 组

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

于 2009-08-14T10:11:54.293 回答