can't read file using Finder from FileMaker

I’m trying to get an AppleScript inside FileMaker Pro to read the contents of a text file. If I were doing a script running on its own I could use

set f to alias (folderpath & theFile)
	set s to read f
	set theContent to s

but I can’t use this in FileMaker’s Perform Native AppleScript window, it seems to want this within a tell block.

If I put the command in a Tell “Finder” block FileMaker replies Finder got an error: Can’t make document file … into type file

I get this same error if I try this in a “regular” script running in Script Debugger. But in Script Debugger I can leave out the tell block and all is well.

What should I be doing in my Applescript to get this file read? Since FileMaker can’t so it which application should I tell?

Thank you.


try a file reference instead of an alias

set f to folderpath & theFile
set s to read file f
set theContent to s

NIce! Thank you, I need to learn the difference between aliases and file references.