Re: Source Text of Script Objects
Re: Source Text of Script Objects
- Subject: Re: Source Text of Script Objects
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 30 Dec 2001 12:45:39 -0800
On 12/30/01 12:20 PM, "has" <email@hidden> wrote:
>
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).
Oh, I see. No, the question began concerning an already open script in
Script Debugger. Script Debugger can even get individual script handlers
(and it's almost as scriptable as Smile) but not their text. Shane Stanley
came up with a great way to do that after my less great solution. SD can
also open scripts and get the (whole) contents of window 1.
BTW, I was using Smile before you were born - here at any rate. :-) I even
wrote a detailed review of it, with Peter Fine, which is at the AppleScript
SourceBook:
http://www.AppleScriptSourcebook.com. Search on Smile and click
the first link. (It appears to be by "Satimage SARL", but that's Smile, of
course, not the review. The authors' names are at the bottom.) You never
know - you might even discover one or two things about Smile you didn't know
there. ;-)
--
Paul Berkowitz