• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: making applescript wait until shell script finishes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: making applescript wait until shell script finishes


  • Subject: RE: making applescript wait until shell script finishes
  • From: "Francois Houle" <email@hidden>
  • Date: Fri, 4 Nov 2005 09:08:48 -0500
  • Thread-topic: making applescript wait until shell script finishes

I'm wondering about the oposite... How would I make it so that a script
doesn't wait for the results of a "do shell script" statement... and
also how can I kill a process launched by the do shell script (I
basically want it to output to a text file for lets say 30 seconds and
the cut it off. Should I simply send a killall shell script command to
shut the process off ?

Thanks

Frank


-----Original Message-----
From: applescript-users-bounces+francois.houle=email@hidden
[mailto:applescript-users-bounces+francois.houle=email@hidden.c
om] On Behalf Of Dave Lyons
Sent: Monday, October 31, 2005 7:55 PM
To: Ben Fenstermaker; AS users list
Subject: Re: making applescript wait until shell script finishes

By the way...a quick test shows that:

do shell script "sleep 5"
beep

...blocks until the shell command completes, whereas telling Terminal do
"do script" does not wait:

tell application "Terminal"
	do script "sleep 5"
	beep
end tell

(In this case, using "mount volume" does sound better.)

Cheers,

--Dave

On Oct 28, 2005, at 11:26 AM, Ben Fenstermaker wrote:

> I have answered my own question... Simply used the mount volume
> command in applescript instead of a do shell script statement.
>
>
> On 10/28/05 2:13 PM, "Ben Fenstermaker" <email@hidden> wrote:
>
>> Probably a simple question but I am rather new to applescript.
>> Here is bit
>> of the script that I am having trouble with:
>> -snip-
>> Tell application "Terminal"
>> do script "mkdir /Volumes/temp/ & mount_afp -i afp:/at/resfs01/
>> RESEARCH/ /Volumes/temp"
>>     tell application "Finder"
>>         display dialog "Choose your local home folder" buttons {"Ok"}
>> -snip-
>>
>> The problem is that I need the script to wait until the user puts in
>> a username and password for the mount_afp command in the terminal
>> window before continuing on with the rest of the script. I am pretty
>> sure this is doable but for the life of me I cant find how to do it.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mcgill.ca

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

  • Follow-Ups:
    • Re: making applescript wait until shell script finishes
      • From: Bernardo Hoehl <email@hidden>
  • Prev by Date: Re: How to work with XML data using System Events?
  • Next by Date: Re: How to work with XML data using System Events?
  • Previous by thread: About snap to grid
  • Next by thread: Re: making applescript wait until shell script finishes
  • Index(es):
    • Date
    • Thread