I was playing around with the Macs at school, at I found a neat little hack that could be used for good or chaos, depending on how evil you are. NOTE: Some UNIX experience may be required in order to understand this.
In case you didn't know, the majority of the apps in your "Applications" folder are simply folders with the extension ".app". You can't go into the folders using Finder, but that is why God invented the UNIX terminal. You can open up the terminal and "cd" (change directory) into the app, really being just a folder.
Inside, you'll find that there are a bunch of files, but the one you're looking for is a shell script that will run automatically any time that the app is opened. (I don't remember the name of the script, but I do remember that the name made it pretty obvious that it would run whenever you opened the app.)
"chmod" the script to make it editable, and then open it with vim. (Do not use emacs, because emacs is stupid.) Add or remove commands to your liking, save it, "chmod" it back to read-only, and open the app. The commands you set will run.
I tested this using Firefox on an Intel Mac running 10.5, and successfully set it to launch a ping flood against the school web site whenever Firefox was opened. Then I deleted the commands and restored it to its original state, because I didn't feel like being expelled that day.
Have fun!