Trigger a Script on run an application?

Hi, Dear Scripters!
Could somebody of you tell me how can I trigger a Script when I run an application? For example, I run my iPhoto and in that moment runs a Script that imports photo files from some folder. Thank you very much!
Alex

One way would be to make the script activate the application, rather than the other way around.

tell application "iPhoto" to activate
-- The rest of your script

John M