scripting import of a project/library

0 views
Skip to first unread message

M Pulis

unread,
Dec 19, 2010, 2:13:17 AM12/19/10
to aperture-dev@lists.apple.com List
Folks,

Not sure if this is an error in my applescripting, understanding the Aperture dictionary, or changes in Aperture V3...

So instead of simultaneous cross-posting, I'll start on this list. Please advise if a different list is may be more appropriate,

Trying to write an Applescript to import into Aperture 3 a project exported from Aperture 3. My script, based (loosely) on the example in the Applescript dictionary, fails to import.

Although I have a script for the export, a test export file can be prepared by clicking a Project then using File > Export > Project As New Library, with Consolidate masters option checked. This file is then copied to another Mac and can be manually imported, yet fails to import via script.

The import command 'into' parameter appears to only accept a Project, although the dictionary leads me to think I can import a Project into a Folder or Library. I do note that my exported file (bundle)  is now a "Library" (.aplibrary) and not a "Project" (".approject") but I don't see a Aperture File > Export > Project As A Project. Even more curious, Aperture File > Import > Library/Project does what I think my script should do....

Any help or hints, implications, etc. will be appreciated. 8-))


Gary

tell application "System Events"
set importFolder to (choose folder with prompt "choose")
set importFiles to (get path of every file of importFolder where visible is true)
end tell

tell application "Aperture"
activate
with timeout of 600 seconds
import importFiles into library 1
end timeout
end tell

Reply all
Reply to author
Forward
0 new messages