I am a newbie to Apple, Mac, and Applescript, and am only a hobbyist scripter with Apple. I’ve scripted in Perl and UNIX before, but that’s it. i’ve searched the forums and archives of MacScripter but not found an answer to my specific problem (that I could recognize - of course, I’m a newbie to MacScripter too!).
I want to burn DVDs of all my photos, which means I need to divide them into 3.5 GB sets (or a bit larger). I used to group them in separate folders on Windows, but I’d like to use iPhoto to track them and don’t want to have a duplicate set in folders too. I thought a good way to do it would be to assign the DVD name as a keyword to each 3.5 of photos, then export all photos with that keyword and burn to DVD. Keywords would be something like “DVD_A”, “DVD_B”, “DVD_C”, etc. I want to automate this for future imports of photos, so that as it imports them, it checks to see how many GB there are in the last keyword, fills it up to 3.5 GB, then starts assigning to the next keyword, etc.
If there is a better way to do it within iPhoto, I’d be happy to use that. Otherwise, I’m hoping someone on MacScripter can help me with the script. Here’s all I have so far (not much!):
property theFolder : “the:name:of:the:photo:folder”
try
tell application “Finder” to set theFiles to files of folder theFolder
repeat with oneFile in theFiles
tell application “iPhoto”
import from (oneFile as alias)
end tell
end repeat
end try
-
I don’t know how to get iPhoto to give me the size of the image so I can start totaling it up.
-
I know I can’t create keywords in iPhoto (according to an Applescript forum entry I saw) so I would create the keywords in advance (“DVD_A”, “DVD_B”, “DVD_C”, etc.). But then I don’t know how to find the last-used keyword in the list, and find how much space its files already take.
If that is too complicated a task for a simple Applescript, I can use Perl to group the images/videos to be imported into folders whose name IS the keyword (DVD_A, etc.). Perl could also ensure each folder will have no more than 3.5 GB of photos in it. Then the Applescript can just assign the keyword that matches the Folder name, and I’ll delete folders as soon as they’re fully imported.
- Also, there may be photos in the folder that have already been imported, and so I want to tell iPhoto to skip importing duplicates. Is that a parameter I can set?
Lastly, sorry for not knowing how to really say these things. Don’t have the lingo yet.
Scott