Hi (newbie)
With many thanks to one of the members on this forum, I’m attempting to put together a short script - part of which will be to monitor & detect when a blank DVD is inserted (for burning), and to error check and provide dialog if it doesn’t appear in a short time (10 seconds - ish!). I’ve pestered him enough over the last few days, so I’m hoping someone else may be able to give me some guidance.
I’m attempting to work through some previous examples to put this together, but I’m getting a bit lost.
Could someone either give me a few pointers, or a sample which would help get the following script working (hope I’ve explained that correctly)?
It’s probably way off the mark, but I’ve been sitting here for the last three hours with my “Dummies” book and scouring these forums . . . . and I think it’s time to ask for help!
set Disc_inserted to list disks
if (do shell script "drutil discinfo") contains "discType" then
set Disc_inserted to true
activate
display dialog "Blank Disc Inserted and ready" giving up after 3
else
set Disc_inserted to false
activate
display dialog "Blank Disc not inserted" buttons {"Try Again", "Cancel"} default button 1
--this should ideally start to check again if the DVD has not been inserted - hence "Try Again"
tell application "Finder"
set repeat_count to 1
repeat until Disc_inserted contains "discType" or repeat_count = 10
set Disc_inserted to list disks
if Disc_inserted contains "discType" then set Disc_inserted to true
delay 3
set repeat_count to repeat_count + 1
end repeat
end tell
if Disc_inserted is false then
activate
display dialog "Where's the DVD?" buttons {"Try Again", "Cancel"} default button 1
--and again, if there's no blank DVD presently mounted, "Try Again" should restart this sequence or cancel the whole script if possible.
end if
end if
Many thanks in advance,
Steve