Applescript 选择多个项目时的光圈项目ID

Applescript 选择多个项目时的光圈项目ID,applescript,Applescript,我正在尝试获取库中多个选定项目的项目ID。仅选择一个项目时,浏览器中也会选择一个图像版本,以便我可以通过以下方式访问id: tell application "Aperture" tell item 1 of (selection as list) to set projId to parent's id end tell 但是,当选择多个项目时,浏览器中不会选择任何图像版本,因此上述操作将不起作用。我知道我可以借助UI来选择图片,然后循环提取id,但我希望避免这样做 activate

我正在尝试获取库中多个选定项目的项目ID。仅选择一个项目时,浏览器中也会选择一个图像版本,以便我可以通过以下方式访问id:

tell application "Aperture"
    tell item 1 of (selection as list) to set projId to parent's id
end tell
但是,当选择多个项目时,浏览器中不会选择任何图像版本,因此上述操作将不起作用。我知道我可以借助UI来选择图片,然后循环提取id,但我希望避免这样做

activate application "Aperture"
tell application "System Events"
    tell process "Aperture"
        keystroke (ASCII character 29) -- Right
    end tell
end tell
获取光圈中选定项目或多个项目的项目id的最佳方法是什么