1

我有一系列由数码相机的存储卡制作的光盘图像。因此,基本上,DCIM 文件夹中有一堆照片和视频。

在我看来,应该有一种方法可以让 applescript 挂载这些光盘映像并将所有这些照片添加到我的 iphoto 库中,按事件分隔天数。我还希望它只导入照片——跳过所有视频。

有人知道魔法密码吗?

4

1 回答 1

-1

这应该会有所帮助。我刚从网上把它拼凑起来。让我知道它是否有效。:)

tell application "Finder"
  if not (exists "disk_image_name")
    do shell script hdiutil mount "disk_image_name".dmg
  end if
end tell
tell application "iPhoto"
        import from "disk_image_name"
        delay 5 -- wait for import to finish
        tell (the first album whose name is "albumtoimportto") to select photos
        assign keyword string "autoimport"
        select (the first album whose name is "autoimport")
        close application "iPhoto"
    end tell
于 2012-07-30T10:30:34.113 回答