Re: Filemaker and AppleScript and Compilation....
Re: Filemaker and AppleScript and Compilation....
- Subject: Re: Filemaker and AppleScript and Compilation....
- From: "Gary (Lists)" <email@hidden>
- Date: Wed, 20 Apr 2005 10:12:35 -0400
David Crowe wrote [4/20/05 10:01 AM]:
> I had assumed that when a static string was used as an AppleScript in
> filemaker (as opposed to a field) that compilation would occur once.
>
> However, the simple applescript:
>
> property x : "abc"
> display dialog "X?" default answer x
> set x to text returned of the result
Yes, this is standard. You can not use those kinds of persistent properties
inside the FM script maker. The reason is technically beyond me, but
logically clear to me: there is not persistent object in which to store the
property value. Or whatever.
A fix is easy, however. Just simulate the behavior.
> Is there any way to stop FileMaker from recompiling the script every time?
Yes, just put whatever you would normally have put in a property into a
private field. I use a repeating field (i.e. "array" or "list") to store
such things. I make it global, and I do not include it on any layout.
This limits the kinds of things you can put there, obviously. You can't,
for example, store a script object there, I think.
Another solution -- not so good, but I have used it for real-world projects
-- is to build a small applet that travels with your FM file. That applet
can be invoked from FM using any number of methods: Send AppleEvent, Run
'Blah.app', and so on.
HTH
--
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden