Re: hdiutil burn
Re: hdiutil burn
- Subject: Re: hdiutil burn
- From: Luther Fuller <email@hidden>
- Date: Thu, 5 Jan 2006 14:44:44 -0600
Title: Re: hdiutil burn
After trying ...
"hdiutil burn " &
sourceImage & " -optimizeimage
&> /dev/null &"
I found that while it solved my problem, it
caused me to lose control. There's now a process 'hdiutil' running,
but it no longer belongs to me and may not be the instance launched by
my application. So, I went for the unorthodox solution. I
started working on it noon Tuesday and got it working by late
evening.
First, I wrote an application, named "burning",
containing only ...
on open paramList
item 1 of paramList -- alias to
file
set imagePath to quoted form of (POSIX
path of the result)
if (item 2 of paramList) then --
leaveAppendable
"hdiutil burn " & imagePath & " -optimizeimage
-noforceclose"
else
"hdiutil burn " & imagePath & " -optimizeimage
-forceclose"
end if
do shell script the result
end open
I copied this application into the
/Contents/Resources/ folder in my main application
bundle.
The main application calls the application
above like this ...
-- begin
burn to disk ----------------------------
tell application "Finder"
set
resFolder to (folder "Resources" of folder "Contents"
of (path to me)) as alias
set applname to (resFolder as text) &
"burning.app"
end tell
ignoring application responses
launch application applname
tell application applname to open {itemRef,
leaveAppendable}
--
itemRef is an alias to the disk image file
end
ignoring
-- monitor burn progress
-----------------------------
tell application "Finder"
repeat until exists (some process whose name is
"burning")
end
repeat
repeat until not (exists (some process whose name is
"burning"))
say "Are we there
yet?"
delay 2
end
repeat
say
"We are there. The disk has finished burning."
end
tell
Yes, I know it's irritating, but trying to
use a dialog is even worse. And it's very effective. I will probably
remove 'say' from the final version - maybe. Or, perhaps play
music?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden