March 18th, 2010
The premise: In a lab situation, I am deploying software. Some of
the software demands that the CD be inserted in order to run, but I am
for obvious reasons not going to give out the software. Instead, I
have created disk images of the CDs in question, and can mount them
and the software works properly. With several software packages
available, I don't want to clutter up the desktops of the lab machines
with dozens of mounted disk images.
The problem: I need a way to automatically mount the needed disk
image, run the application, and unmount the disk image when the
application quits. I can get each part to run by itself, but I need a
way to wait until the application has quit before I unmount the disk
image.
The answer: An Applescript, some pointers that get me going in the
right direction, the one command I need to pause the applescript until
the application it launches has quit, etc.Ach - sorry. I had that info in a first draft but it got lost
somewhere along the way. The machines are currently running OS9.2.2
in the lab, but there are other computers running 9.1 and OSes as far
back as 8.0. I assume under OSX it's a simple matter of creating a
shell script, but if it isn't and you know how to make that work too,
I'd be appreciative. OS9 is the main thrust of the question though.Are the lab machines running Mac OS X, OS 9, or an ealier version?OSAX?
Yeah - it seems that Apple's done a pretty good job making their GUI
tools CLI-accessible, so a shell script should do it. I can probably
figure it out myself (I've done a little shell scripting in bash under
linux...), but if you want to save me the trouble of looking up the
right commands, that's definately worth $2:)
I believe we're putting Python on all the lab machines, so if you know
of a way to get it to work under Classic MacOS with Python, that would
work too.As far as I can tell, it's impossible to do this in Applescript alone.
However, I have been able to track down an OSAX that offers this
functionality - would that constitute an acceptable answer?
(In OS X, should just be a matter of a shell script, yes.)#If you have any other info about this subject , Please add it free.# |
|
Posted in portal.hzfq.com | edit