Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Scripting question: how to suppress Aperture dialog when exporting?

Hi Forum,


I started to write an AppleScript for Aperture to perform a backup. The standard backup procedures of Aperture are not quite right for me so I decided to write my own using AppleScript.


One question which arised was how I can supppress the dialog box which Aperture opens when an export could not be done because of a missing master. I want to suppress the dialog box and instead get an error returned from Aperture into AppleScript. is that possible?


Koen van Dijken

Posted on Feb 1, 2012 12:42 PM

Reply
Question marked as Best reply

Posted on Feb 2, 2012 3:46 AM

Hello Koen,

have you solved your problem by now? For me the following does work:


I does not seem to be possible to set Aperture to suppress the warning, so catching the error in a "try" clause will not help. The best option is to check, if the master image is online, before trying to export and skipping the offline images, like in this example, see: http:/dreschler-fischer.de/scripts/ExportMastersWithoutWarning.scpt.zip


on run {}


-- export masters, but check it they are online before trying to export


-- skip if not online

set exportFolder to (choose folder with prompt "Choose an export folder")


tell application "Aperture"

set imageSel to (get selection)

if imageSel is {} then

error "Please select an image."

else

repeat with i from 1 to count of imageSel

try

set onlne to get online of (item i of imageSel)

if onlne then export {itemi of imageSel} naming folders withfolder naming policy ¬

"Project Name" to exportFolder

end try

end repeat

return imageSel

end if

end tell

end run


Regards

Léonie

2 replies
Question marked as Best reply

Feb 2, 2012 3:46 AM in response to Koen van Dijken

Hello Koen,

have you solved your problem by now? For me the following does work:


I does not seem to be possible to set Aperture to suppress the warning, so catching the error in a "try" clause will not help. The best option is to check, if the master image is online, before trying to export and skipping the offline images, like in this example, see: http:/dreschler-fischer.de/scripts/ExportMastersWithoutWarning.scpt.zip


on run {}


-- export masters, but check it they are online before trying to export


-- skip if not online

set exportFolder to (choose folder with prompt "Choose an export folder")


tell application "Aperture"

set imageSel to (get selection)

if imageSel is {} then

error "Please select an image."

else

repeat with i from 1 to count of imageSel

try

set onlne to get online of (item i of imageSel)

if onlne then export {itemi of imageSel} naming folders withfolder naming policy ¬

"Project Name" to exportFolder

end try

end repeat

return imageSel

end if

end tell

end run


Regards

Léonie

Scripting question: how to suppress Aperture dialog when exporting?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.