Re: Settings properties from a loaded script
Re: Settings properties from a loaded script
- Subject: Re: Settings properties from a loaded script
- From: Richard 23 <email@hidden>
- Date: Mon, 8 Jan 2001 21:11:18 -0800
>
My problem is that the handlers called are unable to set properties in the
>
running script.
>
>
Is there another way to set the properties without using the result command?
This is what I was ranting about the other day...getting loaded script
objects
to be able to run in the context of the loader.
>
set loadedScript to load script filePath
>
mySetting() of loadedScript
>
set theProperty to the result
You could shorten that to
tell loadedScript to set theProperty to mySetting()
or
tell (load script file filePath) to set theProperty to mySetting()
When you have several properties you would like to get, why not construct
your loaded script so that it ends with a return statement, returning all
the properties you're going to use? Then you would use run script instead
of load script. Useful if it's a one-time grab.
R23