At 11:04 AM -0600 1/4/02, Thomas Reed wrote:
>I'm writing a Finder-like app for young kids, and I've hit a wall on one
>thing.
>
>Much of the software I want to be able to launch requires that the CD be
>in the drive -- otherwise, the software doesn't run. I've got everything
>set so that if a kid selects one of these items, it'll search the list of
>mounted volumes and find out if the appropriate CD is there or not.
Once I put a gihugic HD [OK, 60 GB] in my iMac, I set it up so I could get rid
of all the kids' CDs to prevent mishandling, jamming two CDs into the iMac's
slot, etc.
My solution to this was to create a disk image of every CD. Each one lives in
the folder with the installed app [if the software in question requires
installation]. I then wrote up an AppleScript that is copied into every
application's folder. The kids' DragThing dock then gets filled with those
AppleScripts [with appropriate icons].
The Applescript:
1. Looks for alias[es] in the same folder called "disktomount1" through
"disktomount9". If they're found, it tells DiskCopy to mount them.
It keeps track of what new volumes appear as a result of this process.
2. Once that's complete, it looks for an alias named "apptolaunch" and ...
launches it, oddly enough. ;)
3. the script then hangs around waiting for the app to quit
4. when the app goes away, the Finder is told to "eject" all the volumes
from step 1.
Maybe a similar approach will work for you.
The "magic names" were used because adding a new game then becomes a matter of
making a disk image, running an install, copying in an unmodified script, and
making two aliases.
chazl
--
I'm gonna tell my son to grow up as pretty as the grass is green
and as whip-smart as the English Channel is wide...
- Liz Phair, Whip Smart
Chaz Larson - chaz at spamcop dot net - http://www.visi.com/~chaz
|