Ok, here are the steps to take. Doing this involves generating two scripts, the first of which will have the system monitor the attachment of a hard drive, and the second which will conditionally open iPhoto. To make these and set them up, perform the following steps (it is a little involved, but will get you the result you want):
Script 1: A launch agent to monitor attached hard drives
1. Open the Terminal utility in the /Applications/Utilities/ folder. Then copy and paste the following command into it and press Enter, which will open up an editor program in the Terminal:
pico ~/Library/LaunchAgents/iphotodrive.plist
2. Now copy and paste the following text to the Terminal window in its entirety so it is all entered into the Terminal editor:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.iPhotoDrive</string>
<key>QueueDirectories</key>
<array/>
<key>WatchPaths</key>
<array>
<string>/Volumes</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/Users/USERNAME/Library/iphotodrive.sh</string>
</array>
</dict>
</plist>
3. Use the arrow keys to navigate your cursor down to the place where it says /Users/USERNAME/Library..., and change the text of "USERNAME" to be the same name as your account home folder. For example, my login name in OS X is "tkessler" so my home folder is also "tkessler," so for me this is what should go in place of "USERNAME" in the text above.
4. Now press Control-O to save the file, and then Control-X to exit the editor (use Control, and not the standard Command key here).
Script 2: A shell script to open iPhoto when your drive is attached
1. Type (or copy and paste) the following command in the same Terminal window to make the second script in the same editor:
pico ~/Library/iphotodrive.sh
2. Now copy and paste the following text into the Terminal editor:
#/bin/bash
if [ -d /Volumes/"IPHOTODRIVE" ]; then
open -a iPhoto;
fi
3. Again use the arrow keys to navigate, and edit the text IPHOTODRIVE to be the exact name of the drive you would like to spur iPhoto to open. The name will be case-sensitive, and spaces are OK within the quotes.
4. Again save this file by pressing Control-O, then press Control-X to quit the editor.
5. Next ensure this new script can be run, so to do this now copy and paste the following command:
chmod +x ~/Library/iphotodrive.sh
Now to activate these scripts you can log out of your account and log back in, and they should work as expeted, and will launch iPhoto only when a drive named "IPHOTODRIVE" (or whatever you edited this entry to be) is attached to the system. This procedure will create two files at the following locations on your computer, so to undo it simply remove these two files followed by logging out and back in, and you should be good to go:
/Users/USERNAME/Library/iphotodrive.sh
/Users/USERNAME/Library/LaunchAgents/iphotodrive.plist
If you run into any problems, then write back here and we can figure out if there are any nuance details to cover for your setup.