Re: Script objects on the fly
Re: Script objects on the fly
- Subject: Re: Script objects on the fly
- From: Richard 23 <email@hidden>
- Date: Fri, 12 Jan 2001 21:31:54 -0800
>
Can anyone think of a way of making a script object 'on the fly?'
I do all the time.
>
Ideally, I'd like to be able to specify the name of the script and
>
add properties and methods, but being able to make a new script with
>
a given name would be the most handy.
Unlike JavaScript, AppleScript doesn't let you add properties and
handlers to an existing script object at runtime. You can reassign
existing ones and the reassignment persists.
You can also create new script objects (containing generated handlers)
with run script and execute those on the fly, although getting them to
access the top-level script can sometimes be an exercise in frustration.
Let me know if you want more specificity.
R23
You'll find working examples of such things in some of my scripts
on my site.
http://homepage.mac.com/richard23/