Applescript 如何获取iphoto相册的名称

Applescript 如何获取iphoto相册的名称,applescript,iphoto,Applescript,Iphoto,我正试图用applescript/iphoto找到专辑的名字。到目前为止我已经知道了 tell application "iPhoto" activate set theEvents to get every album repeat with aEvent in theEvents log name of aEvent end repeat end tell 但当它打印名字时,我得到了这个: (*name of album id 6.442450942E+9*) (*name of

我正试图用applescript/iphoto找到专辑的名字。到目前为止我已经知道了

tell application "iPhoto"
activate
set theEvents to get every album
repeat with aEvent in theEvents
    log name of aEvent
end repeat
end tell
但当它打印名字时,我得到了这个:

(*name of album id 6.442450942E+9*)
(*name of album id 6.442450941E+9*)
(*name of album id 6.44245094E+9*)
不完全是我想要的。我对applescript很陌生,所以我怀疑一些基本的东西出了问题,但我在网上看到的几个例子似乎都是这样的。谢谢你的帮助

更新

可能已经找到了答案。我看到一些提示,与相册名称不同,使用applescript直接访问事件名称是不可能的(对我来说似乎很愚蠢,但这就是我目前发现的)

尝试以下方法:

tell application "iPhoto"
activate
set theEvents to get every album
repeat with aEvent in theEvents
    log (get name of aEvent)
end repeat
end tell
log
命令不会隐式取消引用正在传递的对象说明符。添加一个
get
命令就可以做到这一点。

答案#1已经被接受,但我想把它发布给未来的读者

    tell application "iPhoto" to set theEvents to get name of every album


    #You can then use the theEvents list.


    #Example - log  items of theEvents 
    log theEvents
--> {"Events", "Faces", "Places", "Photos", "Last 12 Months", "Last Import", "Flagged","Trash", "My Photo Stream", "Holiday 2008", "Holiday Sep 2008"}



    #Example -  work though the items of theEvents with a repeat loop

    repeat with i from 1 to number of items in theEvents
        set this_item to item i of theEvents
        if this_item contains "Holiday" then
            log this_item
-->(*Holiday 2008*)
-->(*Holiday Sep 2008*)
        end if
    end repeat

狗娘养的。在阅读了其他一些网站后,我认为这是不可能的。非常感谢。这将返回相册的名称,而不是活动的名称。iPhoto 9.6似乎没有在applescript.Thank中公开事件。这就是我真正要去的地方。我想循环所有的事件,只是事件。你能发布这个片段吗?我看过了。您可以将EventalBum设置为events相册。而政府应该能够做到这一点。将Ventalbum的子对象设置为Ventalbum的子对象。但它不会返回任何事件!!