• 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: Unwanted output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unwanted output


  • Subject: Re: Unwanted output
  • From: Steve Mills <email@hidden>
  • Date: Wed, 24 Aug 2016 12:11:53 -0500

On Aug 24, 2016, at 12:00:26, debt <email@hidden> wrote:
>
> 	Thanks, Steve, but that’s not correct.  Running the following code in Terminal does what I said before:
>
> system('osascript', '-e',
>       'tell application "BBEdit"
>           activate
>           open "/some/file.txt"
>       end tell');

You should've said that in the first place. If you want to ignore output from any shell command, route it to /dev/null:

osascript 'return 123' > /dev/null

I have no idea how you'd do that with the system command you're using.

> 	Side question: why does it print "text document 1” instead of the name of the file being explicitly opened?

Like I said before, that's the result of the open command. It returns the object that was created.

--
Steve Mills
Drummer, Mac geek


 _______________________________________________
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


References: 
 >Unwanted output (From: debt <email@hidden>)
 >Re: Unwanted output (From: Steve Mills <email@hidden>)
 >Re: Unwanted output (From: debt <email@hidden>)

  • Prev by Date: Re: Unwanted output
  • Next by Date: Re: Unwanted output
  • Previous by thread: Re: Unwanted output
  • Next by thread: Re: [SOLVED] Unwanted output
  • Index(es):
    • Date
    • Thread