Re: Saving handler-defined scripts without source code
Re: Saving handler-defined scripts without source code
- Subject: Re: Saving handler-defined scripts without source code
- From: "Arthur J. Knapp" <email@hidden>
- Date: Fri, 10 Jan 2003 17:23:27 -0500
>
Date: Sat, 11 Jan 2003 00:11:06 +1100
>
Subject: Saving handler-defined scripts without source code
>
From: Steven Angier <email@hidden>
>
Does anyone know how to save a handler-defined script so that its source
>
code is not stored in the file? I have several rather large objects wrapped
>
in constructor functions which tip the scales at around 100 KB when they
>
should only be around 20 KB.
The great Richard 23, in a rare on-list appearance last year, showed us
how to do this very thing:
<
http://lists.apple.com/mhonarc/applescript-users/msg31751.html>
>
> script
>
> property parent : AppleScript
>
> script
>
> property icon : the clipboard
>
> return my icon
>
> end script
>
> end script
>
> run script result
>
>
>
> store script result in file "Private:icon data"
>
>
>
> -- -------------------------------------
>
>
>
> Why the nested script object and the parent property set to
>
> AppleScript? store script stores a script along with it's parent
>
> context (the script which contains it). If you just want to
>
> store some values without the extra baggage it helps to wrap
>
> that rascal otherwise the resulting file is the same size as
>
> your original script + the data you're storing.
>
>
>
> Hope this is helpful in some way.
>
>
>
> Richard 23
{ Arthur Knapp, of <
http://www.STELLARViSIONs.com>
a r t h u r @ s t e l l a r v i s i o n s . c o m
"Safe the Nature" - political graffiti in Prague
}
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.