iPhoto: Empty trash

This empties iPhoto’s trash without warning. If you’d like to add the warning, just delete the delay 1 and keystroke return lines from the script. (Requires UI scripting enabled.)

--Empty iPhoto's trash
tell application "System Events"
tell application "iPhoto" to activate
tell process "iPhoto" to keystroke (ASCII character 8) using shift down & command down
delay 1
keystroke return
end tell