I’m by no means a programmer, and my experience with AppleScript is a bit limited, but I’d appreciate any help!!
I’m writing an Export Action script for Adobe Lightroom that (after Lightroom exports the photos to a folder) opens iPhoto Library Manager, selects the correct iPhoto library, imports the photos into an album, and deletes the folder. It runs fine from within the Script Editor, but when I try to run it from Lightroom, it aborts. I believe Lightroom is trying to pass the exported photos to the script, and the script doesn’t know what to do with the input. Is there a way to tell the script to accept the files, but to perform other actions before using the photos? I’m stuck.
Again, I’m not a programmer, and I’m sure this is poorly written, but here’s my script:
global libCount set quitter to 0 tell application "iPhoto Library Manager" activate --count the number of libraries, find the "Projects" library, and select it: set libCount to (count libraries) if name of library libCount is "Projects" then set current of library libCount to true else set counter to 1 repeat until (quitter = 1) if name of library (libCount - counter) is "Projects" then set current of library (libCount - counter) to true set quitter to 1 else counter + 1 set quitter to 0 end if end repeat end if end tell --import photos: tell application "iPhoto" activate new album name "Imported from Lightroom" import from "/Users/gaswirth/Desktop/Export/" to album "Imported from Lightroom" end tell tell application "Finder" to move folder "Users:gaswirth:Desktop:Export" of startup disk to the trash
Thanks for the help!!