AnsweredAssumed Answered

FIlemaker Pro Applescript bug in "write" command

Question asked by AlanHarper on Oct 3, 2011
Latest reply on Oct 12, 2011 by philmodjunk

Title

FIlemaker Pro Applescript bug in "write" command

Post

There is a bug in FileMaker Applescript support, where the "write" verb is somehow mangled. I suspect that this bug is in the FileMaker dictionary, not in the actual implementation of AppleScript, but I can't be sure. It is subtle, and I don't have the tools to figure it out completely.

Details:

The verb "write" is in the standard additions to AppleScript (English, Mac OS 10.6.8). It is used to write to a file reference. For instance:

set fileRef to open for access (path to desktop as string) & "outfile" with write permission
write "hi mom" to fileRef
close access fileRef

However, if you try to this same code in the context of FileMaker's dictionary (using a Tell block), it won't compile. The fact that it won't compile suggests to me that there is an issue with FileMaker's dictionary. But I do not understand what that issue might be, because the word "write" does not appear in FileMaker's Dictionary as seen in AppleScript Editor. The following code does not compile

tell application "FileMaker Pro Advanced"
set fileRef to open for access (path to desktop as string) & "outfile" with write permission
write "hi mom" to fileRef
close access fileRef
end

Further suggesting that the issue is with FileMaker's Applescript Dictionary, the following code does compile (and execute correctly):

tell application "FileMaker Pro Advanced"
set fileRef to open for access (path to desktop as string) & "outfile" with write permission
tell application "Finder"
write "hi mom" to fileRef
end tell
close access fileRef
end tell

Please let me know if you need more information

 

 

Outcomes