I was looking for a script to help me automate the mounting of disk images (mostly our childrens' games), running the application, and finally unmounting the disk image. I found several hints here on macosxhints, mainly this one from emendelson, and all the comments following the hint.
But I wanted to make the script work with all my disk images/apps. So my version of the script looks for a disk image called DiskImage.dmg in the same folder at the application. It also needs the main application to be renamed MainApp.app (or perhaps make an alias with this name pointing to the main application?). Furthermore, I wanted the script to automatically change screen resolution to 640x480 for games that doesn't do that by themselves. My script will do this if the command cscreen (sadly no longer available at the author's site, but it was open source, so ... it can be found, for instance, here) is present in the same directory as the game.
Please feel free to modify and/or clean up the script to improve it as you see fit.
Mac OS X Hints
http://hints.macworld.com/article.php?story=2007011608181916