Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

davidlv

macrumors 68020
Original poster
Apr 5, 2009
2,291
874
Kyoto, Japan
We have a new Pioneer Blue-Ray/DVD optical drive that disappears - the Mac Pro 2009 quad loses track of the drive after a short period of time. One of the readers of the xlr8yourmac page, Lian, was kind enough to offer the script below that polls the drive every 28 seconds, which does work to keep the machine aware of the drive. However, this script, saved as a run only application, will not quit gracefully, requiring a forced quit.:eek:
repeat
do shell script "drutil info"
delay 28
end repeat
Could someone versed in applescript tell me how to modify this script so that it will quit on demand or when the system is shut down?
Thanks in advance for the help.
 
You might try this instead:

on idle
do shell script "drutil info"
return 28
end idle

Save the script as an application and be sure to check "Stay Open" under Options.

Good luck.
 
You might try this instead:

on idle
do shell script "drutil info"
return 28
end idle

Save the script as an application and be sure to check "Stay Open" under Options.

Good luck.
Thanks so much! That seems to work right, at least it runs and quits on demand, and the Pioneer BRD-205 drive remains visible to the Mac Pro. I have been advised that "return 120" will also work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.