• 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: Calling other OSA Scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling other OSA Scripts


  • Subject: Re: Calling other OSA Scripts
  • From: Chris Nebel <email@hidden>
  • Date: Thu, 24 May 2001 14:58:45 -0700
  • Organization: Apple Computer, Inc.

g3pb wrote:

> tell application "MacPerl"
> Do Script "
> for($x=0; $x < 10; $x++) {
> print \"x is $x\\n\";
> }
> "
> end tell
>
> tell application "MacPerl"
> Do Script "iMac:Desktop Folder:test.pl" -- path to perl script file
> end tell

It's worth pointing out that while this works, it's not exactly what Kevin
asked about. OSA provides a generic interface to scripting languages, so
that given some source text, you can compile it and store it, and then given
a OSA compiled script blob, you can load it and execute it. To do this,
though, you need an OSA-compliant version of the language in question. Once
you do, you can use "run script" like this:

run script "for ($x=0; (etc.)" in "Perl"

Doing this same thing from another OSA language presumes that they have some
equivalent to "run script", which most of them do. Unfortunately, I don't
think there's an OSA Perl implementation, so the MacPerl route is the way to
go.


--Chris Nebel
AppleScript Engineering


References: 
 >Re: Calling other OSA Scripts (From: g3pb <email@hidden>)

  • Prev by Date: Re: Interarchy most reliable scripting version
  • Next by Date: Re: SimpleText scriptable in OS X?
  • Previous by thread: Re: Calling other OSA Scripts
  • Next by thread: Clean finder Script breaks in OS X
  • Index(es):
    • Date
    • Thread