• 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: Script objects on the fly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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/


  • Prev by Date: Re: OS 9.1 & RA Status
  • Next by Date: Re: Applescript for the Internet/Cgis
  • Previous by thread: Re: Script objects on the fly
  • Next by thread: Where is Desktop Printer Manager?
  • Index(es):
    • Date
    • Thread