Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to automate iPhoto image import Apps
When I got a digital camera, I found that the integration between the camera and iPhoto wasn't quite as tight as it was between my iPod and iTunes. iTunes automatically syncs and unmounts my iPod, whereas I have to click the "Import" button in iPhoto, and confirm that I want to delete the original images on the camera. Additionally, the camera isn't automatically ejected, so when it powers off after a couple minutes of inactivity, the Finder gives the standard error about a disk being impropertly ejected. Here's a script I put together that imports, deletes, and ejects without any user intervention required.

To work, this script requires Panther with Folder Actions and GUI Scripting enabled. To turn on, click "Enable access for assistive devices" in the Universal Access preference pane. Place the script in Library -> Scripts -> Folder Action Scripts and enable it as a Folder action for /Volumes (you can get to /Volumes by using "Go to Folder" from the Finder's Go menu). This script takes some hints from Apple's GUI Scripting example page, and Apple's Folder Action Scripting example page.

[robg adds: I haven't tested the script, but one caution -- if you automatically delete images from your camera before verifying they imported correctly, you're taking a bit of a risk. If there was an import problem, then your images are gone forever. For that reason, I use a manual import, and never tell iPhoto to delete the images when done.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[6,111 views]  

A script to automate iPhoto image import | 2 comments | Create New Account
Click here to return to the 'A script to automate iPhoto image import' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to automate iPhoto image import
Authored by: meckimeck on Jul 28, '04 06:15:55PM

script works perfect. No worries about automatic erase of photos on the digital camera - it's disabled by default. Cool script - thanks



[ Reply to This | # ]
A script to automate iPhoto image import
Authored by: benpc on Jul 29, '04 01:47:47PM

Here's an oopsie I made writing this script- when the number of images on the camera is sufficiently large to take more than a minute to copy, the applescript copy operation will timeout and kill the script. To solve this, encase the block that tells the finder to move the files in a "with timout of n seconds" (your choice) and "end timout".



[ Reply to This | # ]