This posting is older than 6 months and can contain outdated information.
Thanks for contributing. Just one small comment:
The line
tell application "iPhoto" to activate
would be totally sufficient. By enclosing it with the System Events "tell" block, the activate AppleEvent would actually be relayed through System Events. Because the relaying of AppleEvents - in general - can pose a security risk to execute commands with elevated permissions, Apple no longer supports it under Snow Leopard.
Best regards,
Felix Schwarz