Re: AppleScript. launch executable without waiting for it toterminate
Re: AppleScript. launch executable without waiting for it toterminate
- Subject: Re: AppleScript. launch executable without waiting for it toterminate
- From: Matthew Smith <email@hidden>
- Date: Sat, 20 Jan 2007 13:55:01 +1100
- Thread-topic: AppleScript. launch executable without waiting for it toterminate
You should also redirect standard output and standard error, even if it is
just to /dev/null.
do shell script "\³/Path/To/myExecutable\² 2>&1 >/dev/null"
--
Matthew Smith
> From: Alex Sheh <email@hidden>
> Date: Fri, 19 Jan 2007 18:46:06 -0800
> To: Matthew Smith <email@hidden>, AppleScript Users
> <email@hidden>
> Conversation: AppleScript. launch executable without waiting for it
> toterminate
> Subject: RE: AppleScript. launch executable without waiting for it toterminate
>
> To clarify, do shell script "\³/Path/To/myExecutable\² &" results in the hang
> behavior that I would like to avoid.
> (If the ampersand is outside of the first set of quotes the script doesn't
> even compile).
>
> -----Original Message-----
> From: applescript-users-bounces+asheh=email@hidden
> [mailto:applescript-users-bounces+asheh=email@hidden] On
> Behalf Of Alex Sheh
> Sent: Friday, January 19, 2007 6:43 PM
> To: Matthew Smith; AppleScript Users
> Subject: RE: AppleScript. launch executable without waiting for it toterminate
>
> True, thanks for catching that.
>
> -----Original Message-----
> From: applescript-users-bounces+asheh=email@hidden
> [mailto:applescript-users-bounces+asheh=email@hidden] On
> Behalf Of Matthew Smith
> Sent: Friday, January 19, 2007 6:39 PM
> To: AppleScript Users
> Subject: Re: AppleScript. launch executable without waiting for it to
> terminate
>
> On 20/01/2007 13:26, "Alex Sheh" <email@hidden> wrote:
>
>> Hi all,
>> I would like to write an AppleScript that launches an executable in
>> the background, and then returns immediately. Currently I have the
>> following,
>>
>> do shell script ³/Path/To/myExecutable² &
>> (NOTE: myExecutable runs indefinitely waiting for input)
>>
>> However, even though I specify an ampersand to launch myExecutable in
>> the background, my AppleScript hangs waiting for myExecutable to
>> terminate. Is there a way to achieve the described behavior (my
>> AppleScript returns immediately)?
>
> Don't you mean:
>
> do shell script "\³/Path/To/myExecutable\² &"
>
> The ampersand has to be part of the string parameter of do shell script.
>
> --
> Matthew Smith
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/mailman//archives/applescript-users
>
> 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:
> Archives: http://lists.apple.com/mailman//archives/applescript-users
>
> 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:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden