AnsweredAssumed Answered

This applescript run fine in editor but won't compile in Filemaker??

Question asked by dmyers on Jul 2, 2009
Latest reply on Jul 2, 2009 by FentonJones

Title

This applescript run fine in editor but won't compile in Filemaker??

Post

I wrote a applescript in the editor which runs fine but when I add it to a filemaker button or script using "preform applescript" it won't even compile?? What am I doing wrong? Seems like a filemaker bug to me??

 

set myfile to (path to desktop folder as string) & "output.txt" as string

try
    set ref_num to open for access myfile with write permission
on error
    close access (myfile as alias)
    set ref_num to open for access myfile with write permission
end try

write "Hello World" to ref_num starting at 0 as string
close access ref_num




Outcomes