Re: hdiutil burn
Re: hdiutil burn
- Subject: Re: hdiutil burn
- From: Norman Cohen <email@hidden>
- Date: Mon, 2 Jan 2006 17:03:35 -0800
I'd try backgrounding the do shell script command. From an Apple Tech
note, I found this comment:
Q: I want to start a background server process; how do I make do
shell script not wait until the command completes?
A: Use do shell script "command &> file_path &". do shell script will
return immediately with no result and your AppleScript script will be
running in parallel with your shell script. The shell script’s output
will go into file_path; if you don’t care about the output, use /dev/
null. There is no direct support for getting or manipulating the
background process from AppleScript, but see the next question.
Note: Saying &> file_path is semantically equivalent to > file_path
2>&1, and will direct both standard output and standard error to
file_path. If you need them to go to different places, direct
standard output using > and standard error using 2>. For example, to
send standard error to a file but ignore standard output, do this:
do shell script "command > /dev/null 2> file_path
See the sh man page under "Redirection" for more details.
The tech note can be found at <http://developer.apple.com/technotes/
tn2002/tn2065.html> There is additional information about
backgrounding shell commands as well.
Norm
---
Norman A. Cohen
email@hidden
"As far as the laws of mathematics refer to reality, they are not
certain; and as far as they are certain, they do not refer to reality."
Albert Einstein
On Jan 2, 2006, at 16:28 PM, Luther Fuller wrote:
With a little patience, I've found the problem with using the
command ...
do shell script "hdiutil burn " & sourceImage & " -optimizeimage "
My application hangs because it's waiting for a response from the
command and it does not get a response until the burn is completed.
You can see it happening in Activity Monitor.
So I tried using 'ignoring application responses'. Like this ...
"hdiutil burn " & sourceImage & " -optimizeimage "
ignoring application responses
do shell script the result
end ignoring
It has no effect at all. Same hang. But the disk DID burn correctly!
Anyone have any insight into this?
I hope there's a simple fix. The fix I have in mind is unorthodox,
but I think it will work.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
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