• 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: Ignore responses from do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


Hey Phil,

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?

--
Take Care,
Chris

 _______________________________________________
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

  • Follow-Ups:
    • Re: Ignore responses from do shell script
      • From: Axel Luttgens <email@hidden>
References: 
 >Ignore responses from do shell script (From: Phil Stokes <email@hidden>)
 >Re: Ignore responses from do shell script (From: Axel Luttgens <email@hidden>)
 >Re: Ignore responses from do shell script (From: Phil Stokes <email@hidden>)

  • Prev by Date: Re: Ignore responses from do shell script
  • Next by Date: Re: Ignore responses from do shell script
  • Previous by thread: Re: Ignore responses from do shell script
  • Next by thread: Re: Ignore responses from do shell script
  • Index(es):
    • Date
    • Thread