开发者

Applescript mount disc images and import photos into iphoto library

I have series of disc images that were made from memory cards from my digital camera. So, basically, a bunch of photos and videos in a DCIM folder.

It seems to me that ther开发者_开发知识库e should be a way to have applescript mount those disc images and add all those photos to my iphoto library, separating days by events. I also want it to import JUST photos -- skipping all the videos.

Any body know the magic code?


This should help. I just got it off the internet and pieced it together. Let me know if it works. :)

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜