• 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: Where to log lines go
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where to log lines go


  • Subject: Re: Where to log lines go
  • From: "Mark J. Reed" <email@hidden>
  • Date: Mon, 12 Jan 2009 12:18:55 -0500

Paul: log output from osascript goes nowhere.  It arguably should go
to standard error or something, but osascript does not handle that
event.  If that's all you wanted to know, now you do.  Good luck.

Philip attempted to go further to help you resolve your actual issue,
which seemed to be getting output from your script where your calling
program can access it.   Neither AppleScript nor osascript provides
any built-in way to write directly to standard output (or standard
error, or to read from standard input for that matter).  The return
value of a top-level script is sent to stdout, but not until right
before osascript exits.   Hence Philip's suggestion to use 'do shell
script "echo" ', which is expensive and roundabout but has the
distinct advantage of actually working.

I thought there might be a workaround via e.g. ' open for access
(POSIX file "/dev/fd/1") ', but that doesn't work; from other poking
around it seems that /dev is wholly invisible from the HFS side.
 _______________________________________________
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: Where to log lines go
      • From: Philip Aker <email@hidden>
    • Re: Where to log lines go
      • From: Paul Taylor <email@hidden>
References: 
 >Where to log lines go (From: Paul Taylor <email@hidden>)
 >Re: Where to log lines go (From: Ed Stockly <email@hidden>)

  • Prev by Date: Re: Calling a C Subroutine
  • Next by Date: Re: How to convert number from exponential form?
  • Previous by thread: Re: Where to log lines go
  • Next by thread: Re: Where to log lines go
  • Index(es):
    • Date
    • Thread