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: Mon, 31 Dec 2001 10:37:20 -0800
On 12/31/01 10:13 AM, "Arthur J Knapp" <email@hidden> wrote:
>
> Date: Sun, 30 Dec 2001 11:07:06 +0000
>
> From: has <email@hidden>
>
> Subject: Re: Source Text of Script Objects
>
>
>
A week off, and I feel great... :)
>
>
>
> 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.
>
>
>
Can someone confirm that this is truely vanilla:
>
>
script theScript
>
>
property HelloWorld : "Hello World"
>
>
on TestIt()
>
1 + 1
>
end TestIt
>
>
"foo" & "bar"
>
>
end script
>
>
>
string {theScript}
>
>
>
Well, the _script_ is vanilla, but all it does is error in Script Editor
(almost wrote Script Idiot) in OS 10.1.2 (AS 1.8.1):
Can't get string {<<script theScript>>}
Same in SD.
So if it's doing something else for you on OS 9, it might be the Jon's
coercion everyone else was having fun with. Or another one.
--
Paul Berkowitz