• 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: Preventing extraneous output from osascript -l JavaScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preventing extraneous output from osascript -l JavaScript


  • Subject: Re: Preventing extraneous output from osascript -l JavaScript
  • From: Paul Scott <email@hidden>
  • Date: Wed, 16 Dec 2015 14:44:13 -0800
  • Dkim-filter: OpenDKIM Filter v2.10.3 secure.paul-scott.us 91A6E40130

> On Dec 16, 2015, at 2:12 PM, Axel Luttgens <email@hidden> wrote:
>
> Could you tell us a bit more about your goal?

As simple as this: I don’t want extraneous output from osascript; i.e., nothing I didn’t write to stdout/stderr, or legitimate error messages from osascript.


> Anyway, it seems that the "problem" may be reduced to:
>
> 	#!/usr/bin/osascript -l JavaScript
> 	var app = Application.currentApplication();
> 	app.includeStandardAdditions = true;

Let’s reduce it further:

#!/usr/bin/osascript -l JavaScript

Run that, and an extra linefeed is ejected. Of course, I can redirect stdout/stderr, but that’s not what I want to do. I want stdout/stderr directed to the terminal, and I want to see any output produced, *except* extraneous output from osascript such as the result of the last executed line or even a lowly linefeed.

The Above single line script (assumed name q) should run like this:

$ ./q
$

Not like this:

$ ./q

$

I can achieve this result with -l AppleScript but not -l JavaScript specified. If there is nothing I can do within the script to avoid this inconsistent behavior, I will file a bug report. But I thought I’d first ask if anyone had solution.

Thanks,
Paul




 _______________________________________________
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: Preventing extraneous output from osascript -l JavaScript
      • From: Axel Luttgens <email@hidden>
References: 
 >Pulling Data from AppleScript (From: Jon Rosen <email@hidden>)
 >Re: Preventing extraneous output from osascript -l JavaScript (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Preventing extraneous output from osascript -l JavaScript
  • Next by Date: Re: Pulling Data from AppleScript
  • Previous by thread: Re: Preventing extraneous output from osascript -l JavaScript
  • Next by thread: Re: Preventing extraneous output from osascript -l JavaScript
  • Index(es):
    • Date
    • Thread