• 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: Source Text of Script Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Source Text of Script Objects


  • Subject: Re: Source Text of Script Objects
  • From: has <email@hidden>
  • Date: Sun, 30 Dec 2001 20:20:59 +0000

Paul Berkowitz wrote:

>>> Does anyone know how to get the source text of a script object - in
>>> applescript?
>>
>> Jon's Commands has a built-in coercion. Alternatively you could script
>> something like Smile to get it. I'm not aware of any vanilla method,
>> unfortunately.
>
>Thanks, has. Unfortunately, Jon's won't work in OS X, where I am most of the
>time (until Jon himself will, we're stuck). But yes, the Satimage osax,
>available in OS X complete with its four 'resource' commands, appears to be
>alive and well. I have never attempted anything with these resource
>commands, however, and don't really know where to start. Does the source
>text of a script have a particular resource number?

Well, the problem with getting a script file's scpt resource is that the
contents have already been compiled, so there's probably not a lot you can
do with it.

What you can do is tell Smile (which is scriptable up to its armpits) to
open the file for you and then get the contents of window 1. That'll give
you what you're after. BTW, for OS X, you'll want to get Smile 2.x.x (for
classic MacOS, use Smile 1.x.x).

HTH

has


  • Follow-Ups:
    • Re: Source Text of Script Objects
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: [META] proper use of mailing list (was RE: Capturing current handler name in a string variable)
  • Next by Date: Re: Source Text of Script Objects
  • Previous by thread: Re: Source Text of Script Objects
  • Next by thread: Re: Source Text of Script Objects
  • Index(es):
    • Date
    • Thread