AnsweredAssumed Answered

FIlemaker Pro Applescript bug in "write" command

Question asked by AlanHarper on Oct 12, 2011
Latest reply on Jan 4, 2012 by AlanHarper

Summary

FIlemaker Pro Applescript bug in "write" command

Product

FileMaker Pro

Version

11.0 v4

Operating system version

10.6.8

Description of the issue

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.

Steps to reproduce the problem

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

Expected result

It should compile

Actual result

It doesn't compile

Exact text of any error message(s) that appear

AppleScript Syntax Error
Expected end of line, etc. but found "''".

Outcomes