AnsweredAssumed Answered

Native Applescript won't compile in FM

Question asked by louk on Mar 22, 2015

Title

Native Applescript won't compile in FM

Post

This script works just fine in AS but returns an error on the next to the last line "write filePathRel to thisFile" when I try to compile it in Filemaker. The error message is "Expected end of line but found identifier":

set userFolder to (path to home folder) as text
set filePathFull to (choose file) as text
set filePathRel to text ((length of userFolder) + 1) thru (length of filePathFull) of filePathFull
set supportFileFull to userFolder & "Library:Application support:Filemaker:Clippings DB location 4.txt"

set thisFile to open for access supportFileFull with write permission
set eof of thisFile to 0
write filePathRel to thisFile
close access thisFile

 

I'd really like to know why the compilation is different via Filemaker.

Thank You in advance for any help!

Outcomes