"Import" verb in iPhoto

So, I’m knew to Applescripting…but decided to jump in because I wanted to write something that would take selected photos from iView Media Pro and import them into iPhoto for me (iPhoto has better printing capabiilities, especially with rolll paper).

I did get it to work, by sending keystrokes to iPhoto to open the IMPORT dialog box and fill out the field with the directory that I had AS copy the files to for import, then move the imported pictures to a temporary album so they’d be easy to find. It works pretty good…BUT…

Here’s the question: during my experimentation, I found that iPhoto has an “IMPORT” verb in it’s Applescript dictionary…but I couldn’t figure out how to make it work, and I can’t find any documentation on it. I’d much rather use this than the ‘keystroke’ method. Anyone have insights into how to make this actually WORK? AS recognizes the command, but keeps erroring out, like I’m not supplying the proper arguments.

Hi bradleysm,

I’m have iPhoto 2.0 which doesn’t have this import command. In my version there are 2 ways to import. One type of import is from the menu as you’re doing with keystrokes. The other import is with the button for importing from camera. Your import command may be for use with importing from camera and if now camera is connected, then this may be the cause of your error.

Just guessing,

That is entirely possible, and I’ll explore that by connecting a camera and seeing what happens. The syntax of the command from the dictionary however, makes it appear as a general import command:

import: Import the given path.
import reference – the object for the command
from Unicode text – The path(s) to import.
[to anything] – The container to which to import the object.