March 2, 201114 yr Hello, I am trying to write an AppleScript script that takes the contents of my clipboard and creates a text(.txt) document from it. I have tried using the built in "Save a Copy As" filemaker script step but it converts the text document into some type of Unicode format that the Python script I am running the .txt document on doesn't recognize. So I have written an AppleScript script which compiles and runs correctly when run from the AppleScript Editor but gives an error message if I try to compile it within the "Perform AppleScript" Script step in FileMaker. Here is the AppleScript: set theText to (get the clipboard as text) set theFile to (open for access file (("Users:georgeorton:Documents:") & "nlpexportfile.txt") with write permission) set eof theFile to 0 -- reset file contents (if any) write theText to theFile close access theFile This script runs correctly from the AppleScript editor but gives the following error message if compiled within FileMaker: Expected end of line, etc. but found identifier. with the "theText" portion of the "write theText to theFile" line highlighted. Does anybody have any idea how to solve this problem? Sincerely, George
March 2, 201114 yr Sounds similar to: http://fmforums.com/forum/topic/75454-write-statement-in-error/page__p__357118#entry357118
March 2, 201114 yr Author Hi, Thanks for the link but unfortunately it didn't work. I tried putting my AppleScript script in a "Tell application "Finder"" block but instead of compiling it opened the AppleScript Dictionary and then locked up my system. Thanks, George
March 2, 201114 yr Hello, I am trying to write an AppleScript script that takes the contents of my clipboard and creates a text(.txt) document from it. I have tried using the built in "Save a Copy As" filemaker script step Save a copy as is for saving a copy of your Filemaker file.
Create an account or sign in to comment