Re: Persistence of properties in AppleScripts within FileMaker Pro scripts
Re: Persistence of properties in AppleScripts within FileMaker Pro scripts
- Subject: Re: Persistence of properties in AppleScripts within FileMaker Pro scripts
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 04 Mar 2003 11:27:48 -0800
On 3/4/03 10:34 AM, "John Delacour" <email@hidden> wrote:
>
At 9:18 am -0400 4/3/03, Bill Briggs wrote:
>
>
> Does anyone know how to make properties stick in AppleScripts run
>
> within FileMaker Pro's scripting architecture?
>
>
You can use the method I described the other day, which requires only
>
one chort line in the prefs file.
>
>
(* ~/library/preferences/myFMPprefs *)
>
-----
>
property prefs: {} as record
>
-----
>
>
>
Then have your script do this:
>
>
set _scriptfile to alias ("" & (path to "pref") & "myFMPprefs")
>
set _loadedScript to load script _scriptfile
>
set my _record to {a:1, b:2, c:3}
>
set the prefs of the _loadedScript to my _record
>
store script _loadedScript in _scriptfile with replacing
>
--
>
set _checkResults to load script _scriptfile
>
get prefs of _checkResults
This looks interesting, John. I think you would have to pre-define _record
in the calling script, or the first call to set 'my _record' will error.
--
Paul Berkowitz
_______________________________________________
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.