RE: Settings properties from a loaded script
RE: Settings properties from a loaded script
- Subject: RE: Settings properties from a loaded script
- From: "Bourque, Jason" <email@hidden>
- Date: Mon, 8 Jan 2001 15:23:37 -0500
Paul,
I sorry there is a misunderstanding. I want to use the loaded script
Variable to set properties in the original script.
Why would you want to store the script?
Jason Bourque
>
-----Original Message-----
>
From: Paul Berkowitz [SMTP:email@hidden]
>
Sent: Monday, January 08, 2001 2:49 PM
>
To: Applescript-Users
>
Subject: Re: Settings properties from a loaded script
>
>
On 1/8/01 11:11 AM, "Bourque, Jason" <email@hidden> wrote:
>
>
> Hello,
>
>
>
> I am trying to set a multitude of properties via a load script command
>
that
>
> has a bunch of dialogs for the user.
>
>
>
> 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?
>
>
>
>
>
> set loadedScript to load script filePath
>
>
>
> mySetting() of loadedScript
>
> set theProperty to the result
>
>
>
>
>
>
Either:
>
>
set loadedScript's theProperty to x
>
>
>
Or you can have an extra handler in the loaded script that does it:
>
>
loadedScript's DoSetting(x)
>
>
Where DoSetting(n) is
>
>
on DoSetting(n)
>
set myProperty to n
>
end DoSetting
>
>
The first way is simpler.
>
>
Either way, don't forget to
>
>
store script loadedScript in alias scriptFilePath
>
>
when done or the properties won't "take". Maybe that's what you forgot to
>
do?
>
>
>
--
>
Paul Berkowitz
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users