I have been trying to do this for hours now and cannot seem to do it.
I want to insert a blank, have an Applescript run, copy some files onto the CD, rename the CD, burn it and eject it. I got the running of Applescript, copying of files and ejecting, but I cannot figure out how to burn the cd.
Hi Rob, HAS, TLI and Everyone else… I needed the dropped files name so that I could use it as a variable to make the following code work…
on open {anAlias}
tell application "Finder" to set discName to name of item anAlias --HAS tip to get the dropped file name as a variable
do shell script "hdiutil unmount "/Volumes/" & discName & """
get word 1 of result
set devName to result
do shell script "hdiutil convert /dev/" & devName & " -format UDTO -o "$HOME/Desktop/" & discName & """
display dialog "Enter the Amount of Time (in seconds) it Takes to Copy a Disc on Your Machine" default answer ""
set copyTime to (text returned of result) + 120 -- add two minutes, for prosperities sake!!
do shell script "sleep " & copyTime
display dialog "Before Hitting "OK". Eject the Original Disc Named ?" & discName & "? By Hitting the Eject Button on Your Keyboard" buttons {"OK"} default button "OK" giving up after 10
tell application "Finder"
activate
display dialog "To Burn a Copy of ?" & discName & "? " & return & "Hit the "OK" Button" default button "OK" giving up after 10
end tell
do shell script "cd $HOME/Desktop;hdiutil burn "" & discName & ".dmg" -noverifyburn -noeject"
end open
Many thanks to HAS, Rob, TLI, & everyone else for the hints that had eluded me for hours.
Anyhow, the above Applescript still needs a bit of UI help. The first try allowed the terminal.app to show the progress, but that was kinda ugly.(Chime in ifin you wish, ideas welcome)
Basically, the above code is designed to make a copy of a CD-Rom that is dropped on the App’s icon. It lacks a few interface elements, but it does work…