Please excuse this quick rant.
:rant
I thought Mac's were the preferred computer for educational software and schools. After having my new iMac 24 for a few weeks I'm not so sure about that anymore. Many educational games cannot change the screen resolution and run in a tiny 640x480 box in the center of my iMac. Almost all require the CD to be inserted. Many have slow, choppy video where the lip movements aren't even close to in sync with the audio. And I won't even open the whole OS X/Classic/Intel can of worms that many titles bring to the table! Oh wait, I did
My wife thinks I'm crazy for replacing her PC with a Mac and running all of our newly purchased kid software in Parallels due to the screen resolution / Classic / Intel problems!
:end rant
What I need to do have an Applescript to do the following: Mount a disk image I made in Toast, change the screen resolution and run the game. Then when the game exits eject the image and reset the desktop screen resolution.
I'm close but not there yet. Sometimes it works, and sometimes I get a Stack Overflow when I exit. I think my problem may be the:
But without the "else idle" the game exit isn't detected and the cleanup never runs.
---------------------------------------------------------
Here is my Script:
-------------------------------------
Anyone have any ideas how to improve this?
Thanks!
:rant
I thought Mac's were the preferred computer for educational software and schools. After having my new iMac 24 for a few weeks I'm not so sure about that anymore. Many educational games cannot change the screen resolution and run in a tiny 640x480 box in the center of my iMac. Almost all require the CD to be inserted. Many have slow, choppy video where the lip movements aren't even close to in sync with the audio. And I won't even open the whole OS X/Classic/Intel can of worms that many titles bring to the table! Oh wait, I did
My wife thinks I'm crazy for replacing her PC with a Mac and running all of our newly purchased kid software in Parallels due to the screen resolution / Classic / Intel problems!
:end rant
What I need to do have an Applescript to do the following: Mount a disk image I made in Toast, change the screen resolution and run the game. Then when the game exits eject the image and reset the desktop screen resolution.
I'm close but not there yet. Sometimes it works, and sometimes I get a Stack Overflow when I exit. I think my problem may be the:
Code:
on idle
if
else
idle
end if
end idle
---------------------------------------------------------
Here is my Script:
Code:
on idle
tell application "System Events"
set myProcesses to (name of every process)
end tell
if "MiaOSX" is not in myProcesses then
do shell script "cscreen -x 1920 -y 1200 -r 60"
tell application "Finder" to eject "Mia2_D1"
tell application "Finder" to eject "Mia2_D2"
tell me to quit
else
idle
end if
end idle
on run
do shell script "cscreen -x 640 -y 480 -r 60"
set myPath to ("Macintosh HD:Users:Shared:Disk Images:")
do shell script ("hdiutil mount \"" & POSIX path of (myPath as string) & "Mia's Romaine's New Hat (Science) Disk 1.iso\"")
do shell script ("hdiutil mount \"" & POSIX path of (myPath as string) & "Mia's Romaine's New Hat (Science) Disk 2.iso\"")
set myApp to myPath & "MiaScience"
tell application myApp to activate
delay 5
idle
end run
Anyone have any ideas how to improve this?
Thanks!