Re: Ignore responses from do shell script
Re: Ignore responses from do shell script
- Subject: Re: Ignore responses from do shell script
- From: Christopher Stone <email@hidden>
- Date: Sat, 09 Jul 2016 07:51:45 -0500
On Jul 09, 2016, at 06:59, Phil Stokes <email@hidden> wrote:
I was able to achieve what I wanted thanks to Alex’s tip to re-read the do shell script doc.
The answer is to run the shell command as a background task using the “&” function.
do shell script theCommand & " &> /dev/null &"
That will kick off the shell script and return control to the AppleScript.
Well, that method fails here.
The following script runs for a very long time as `ls` finishes, and only then does the display notification counter start up.
---------------------------------------- set shCMD to " cd ~/; ls -R; "
do shell script shCMD & " &> /dev/null &"
set cntr to 0
repeat 10 times set cntr to cntr + 1 display notification cntr ¬ with title "Iteration Number"
delay 0.35
end repeat ----------------------------------------
So – what I'm I doing wrong?
|
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden