</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by xmacintosh:
<strong>Hi
I found an applescript to erase CDRWs at MACOSXHINTS.COM, but when I paste the code into Script Editor I have a lot of erros. Can someone help me to create this application? I need it so much.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">The code was ok, there were just two line breaks where there weren't supposed to be (I hate languages that are white-space dependent
)
Anyway, here is how it should be.
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">(*
Erase ReWritable Media
Calls'hdiutil burn -erase' to erase rewritable media
without the terminal or Disk Utility
*)
beep
display dialog "Erase a rewritable disc?" buttons {"Cancel", "Yes"} default button "Cancel" with icon note
set the user_choice to the button returned of the result
if the user_choice is "Yes" then
display dialog "Are you sure you want to erase a disc?" & return & return & "You cannot undo this action." buttons {"Cancel", "OK"} default button "Cancel" with icon alert
set the user_choice to the button returned of the result
if the user_choice is "OK" then
display dialog "Press OK and insert your disc. It may take several minutes to erase your disc."
do shell script "hdiutil burn -erase"
display dialog "Your disc has been erased." buttons {"�"} default button 1 giving up after 10
end if
end if</pre><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Note: If you want to break up a long line in the editor, you can do it. You have to go to where you want to break up the line and press option-return. This will make a new line, and have a little arrow character at the end of the old line. You need that arrow character to avoid any compiler errors.