Newbie question about scripting of Mount multple disk images

I apologize for asking such newbie questions, but I getting in a crunch for time on this issue, and I’ve only just started to learn about Applescripting.

Here is my goal: I need to have 10.2.8 and 10.3 computers do the following after a user logs in:
1) launch classic
2) auto-mount multiple disk images (about 14)
3) close all windows

I first just used OSX login items preference pane, but it just does everything as quickly as possible, and I am getting frequent and inconsisent errors on the mounting of disk images. So I have been trying to script this instead. I can get part of the error checking routine to work, but how do I get past the error messages that the finder and/or Disc copy generates?

Here’s my poorly written script so far:

tell application “Disk Copy” activate
end tell

repeat until (list disks) contains “TT2”
tell application “Finder”
activate
if (list disks) does not contain “GME99” then select file “GME99.img” of folder “Disc Images” of startup disk
open selection
if (list disks) does not contain “Inspiration ® 6.0”
then select file “Inspiration ® 6.0.img” of folder “Disc
Images” of startup disk
open selection
if (list disks) does not contain “Key Mates” then select
file “Key Mates.img” of folder “Disc Images” of startup
disk
open selection
if (list disks) does not contain “Kid Pix Studio Deluxe”
then select file “Kid Pix Studio Deluxe.img” of folder
“Disc Images” of startup disk
open selection
if (list disks) does not contain “Kid Works Deluxe 1.1”
then select file “Kid Works Deluxe 1.1.img” of folder
“Disc Images” of startup disk
open selection
if (list disks) does not contain “Magic School Bus -
Ocean” then select file “Magic School Bus - Ocean.img” of
folder “Disc Images” of startup disk
open selection
if (list disks) does not contain “Magic School Bus” then
select file “Magic School Bus.img” of folder “Disc Images”
of startup disk
open selection
if (list disks) does not contain “Math Blaster 9-12”
then select file “Math Blaster 9-12.img” of folder “Disc
Images” of startup disk
open selection
if (list disks) does not contain “Math Blaster Ages 6-9”
then select file “Math Blaster Ages 6-9.img” of folder
“Disc Images” of startup disk
open selection
if (list disks) does not contain “Math Workshop” then
select file “Math Workshop.img” of folder “Disc Images” of
startup disk
open selection
if (list disks) does not contain “Paws in Typing Town”
then select file “Paws in Typing Town.img” of folder “Disc
Images” of startup disk
open selection
if (list disks) does not contain “Reader Rabbit’s
Reading 1” then select file “Reader Rabbit’s Reading
1.img” of folder “Disc Images” of startup disk
open selection
if (list disks) does not contain “Reader Rabbit’s
Reading 2” then select file “Reader Rabbit’s Reading
2.img” of folder “Disc Images” of startup disk
open selection
if (list disks) does not contain “The Graph Club CD”
then select file “The Graph Club CD.img” of folder “Disc
Images” of startup disk
open selection
if (list disks) does not contain “Treasure MathStorm!”
then select file “Treasure MathStorm!.img” of folder “Disc
Images” of startup disk
open selection
if (list disks) does not contain “TT1” then select file
“TT1.img” of folder “Disc Images” of startup disk
open selection
if (list disks) does not contain “TT2” then select file
“TT2.img” of folder “Disc Images” of startup disk
open selection
end tell
end repeat

tell application “Finder”
activate
close every window
end tell
tell application “Disk Copy”
quit
end tell

Hi,

This works for me to mount the images. I made a folder and placed alias’ of the disk image files I want to mount at login. The following script opens the disk images. It then waits for Disk Copy to run. If Disk Copy doesn’t run, then the script quits (the folder might be empty for example). Otherwise, it jumps to the idle handler. The idle handler checks every 2 seconds if Disk Copy is still running (doing the checksum thing). When Disk Copy quits the script closes all windows and quits.

Almost forgot the script:

global is_done
on run
set is_done to true
tell application “Finder”
open every file of folder “Macintosh HD:Kel Folder (Mac OS 9):Disk Images 1:”
repeat 10 times
if exists process “Disk Copy” then
set is_done to false
exit repeat
end if
end repeat
end tell
if is_done then quit
end run

on idle
tell application “Finder”
if not (exists process “Disk Copy”) then
close every window
set is_done to true
end if
end tell
if is_done then quit
return 2
end idle

To use idle handlers, the script should be saved as a stay open script application. I can’t remember if there was a way to start classic, but one easy way might be to just run some application in classic. Or you could set the preferences to launch classic at startup.

gl,

“Disk Copy” doesn’t exist anymore on 10.3.
“Disk Utility” now takes care of mounting Disk Images with its “DiskImageMounter”.