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