• 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: Creating an environment variable from AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating an environment variable from AppleScript


  • Subject: Re: Creating an environment variable from AppleScript
  • From: "Mark J. Reed" <email@hidden>
  • Date: Mon, 9 Oct 2006 12:09:28 -0400

On 10/9/06, Philip Aker <email@hidden> wrote:
If you want easy control, use Tcl to coordinate:

I fail to see what's so easy about using TCL to run an AppleScript so that you can take the output and feed it to Perl; it seems like wasted overhead. I'm particularly not fond of the part where you take the output of the AS and store it in a TCL varaible and pass it on the command line to Perl, since that introduces complications such as a size limit. In general, if you've got essentially arbitrary string data, you're better off using I/O (pipes if you can, files if you must) than command line arguments.

I'f you're doing part of the job with perl and part with applescript,
just run whichever one does the first part of the job and let it start
up the other as needed.  I see no need to introduce yet a third
interpreter to the mix.  (Well, I guess that's unavoidable in the case
of calling Perl from AppleScript, since the only way I know of to do
that inserts the shell in between them...)  Although, if a pipeline
model is appropriate, you could use the shell to set it up:

#!/bin/sh
osascript -f myAppleScript.as | perl myPerlScript.pl

That won't work if the perl needs to interact with the user via
stdin/stdout, etc., but under the right conditions it could be the
simplest answer.

--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Creating an environment variable from AppleScript
      • From: Philip Aker <email@hidden>
    • Re: Creating an environment variable from AppleScript
      • From: "hackmiester (Hunter Fuller)" <email@hidden>
References: 
 >Re: Creating an environment variable from AppleScript (From: Steve Hayman <email@hidden>)
 >RE: Creating an environment variable from AppleScript (From: "Kumar Shailove" <email@hidden>)
 >Re: Creating an environment variable from AppleScript (From: "Mark J. Reed" <email@hidden>)
 >Re: Creating an environment variable from AppleScript (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Universal Applications
  • Next by Date: Re: Creating an environment variable from AppleScript
  • Previous by thread: Re: Creating an environment variable from AppleScript
  • Next by thread: Re: Creating an environment variable from AppleScript
  • Index(es):
    • Date
    • Thread