As in an automated backup kind of thing?
I can think of the algorithm but have never coded in Apple Script so couldn't help you there. Also, there might be a problem with permissions to run the program as soon as you connect the hard drive...? Could be diagnosed as a potential trojan?
Only way I can think of doing it is having to manually run the program when you connect your hard drive, or have the program running when you connect the hard drive.
Found this for you - the guy here is doing the opposite but the call methods can be reversed to do what you are after.
http://bbs.applescript.net/viewtopic.php?pid=80725