1 Reply Latest reply: May 2, 2011 5:41 PM by andig89
andig89 Level 1 Level 1 (0 points)

Hi !!!

How copy albums from iPhoto to folder by using AppleScript ?? I have tried this - https://discussions.apple.com/thread/461923?start=15&tstart=0 but i have error:

click menu item "Export…" of menu 1 of menu bar item "File" of menu bar 1 of process "iPhoto"

  --> error number -1728 from «class mbri» "File" of «class mbar» 1 of «class prcs» "iPhoto"


It can't find menu bar 1. If someone could help me ?? I need only the same thing what iPhoto does, when it doing "export" but with folders structure.

AppleScript, Mac OS X (10.6.7)
  • andig89 Level 1 Level 1 (0 points)

    Ok. I made script which copy album architecure in to folder. Now i need copy images from iPhoto to folders and i don't know how do it correctly.

    For example


    tell application "iPhoto"

                                                                set sda to photos of sameAlbum

                                                                set lo to number of photos of sameAlbum

                                                                set theCommand to {}

                                                                repeat with n from 1 to lo

                                                                          set paths to image path of item n of sda

                                                                          tell application "Finder" to set currPath to POSIX path of "/Users/dariuszgardynski/Desktop/katalog"

      --set theCommand to theCommand & ("cd " & currPath) & "; "

                                                                          set theCommand to theCommand & "cp " & paths & " " & currPath & "; " as string

      do shell script theCommand

                                                                end repeat

                                                      end tell

    but paths have had recently spaces and shell crush.

    Besides i prefer something like that:

    tell application "Finder" to set currPath to make new folder in desktop with properties {name:"qwerty"}

    duplicate item n of sda to currPath


    Can anyone help ??