Kirby Krieger wrote:
Hi Frank -- many thanks! Varied results: a "Wow!" and a "😕".
Thanks
Closed Aperture, reopened with a larger Library, closed Aperture. (This was to make the larger Library the "current" Library -- needed, I think, since the script defaults to the most recently loaded Library (afaict).)
Yes the scripts uses the last opened or currently opened library. It's the same as when you run Aperture, the last opened library is the one that is used.
If you switch libraries you can leave Aperture opened there is no need for it to be closed befroe the script runs. In fact once you have Aperture open you can use File->Switch to Library to switch libraries and then run the script.
Got the following result:
error "Aperture got an error: AppleEvent timed out." number -1712
There are >20,000 Projects in the larger Library. 😕 . Await your sage advice. 😉
Hmm, > 20,000 projects is a lot but I wouldn't have expected this.
The following modified script will increase the wait time from 2 mins to 10 mins if this is where the error is that should be more then enough time. let me know how this one works.
tell application "Aperture"
set LibraryName to name of every library
end tell
set userCanceled to false
try
set dialogResult to display dialog ¬
"Name of text file?" buttons {"Cancel", "OK"} ¬
default button "OK" cancel button ¬
"Cancel" default answer (LibraryName)
on error number -128
set userCanceled to true
end try
if not userCanceled then
set outFile to (path to desktop as text) & text returned of dialogResult & ".txt"
set fileId to open for accessfileoutFile with write permission
set eof of fileIdto 0
tell application "Aperture"
with timeout of 600 seconds -- 10 minutes
set projectList to name of every project
end timeout
end tell
set AppleScript's text item delimiters to return
write (projectList as string) tofileId
close accessfileId
end if