June 7, 200619 yr Hey There - I have an apple script: set TextOfFile to read choose file with prompt "Choose file to import." Set file_path to "(I have a FilePath here)" open for access file file_path with write permission write TextOfFile to file file_path close access file file_path It works perfectly when I run it through the Applescript editor, but in FM, after I enter it as a native Applescript, it says: Expected End of line, etc. but found identifier. and then it highlights TextofFile in the "Write" line. Help? I attempted to create a calculated applescript too, but when I ran the FM script, the same message popped up. Thanks in advance!
June 7, 200619 yr Put it all inside: tell application "Finder" blah blah end tell FileMaker doesn't like the "write" command. Not sure why.
June 7, 200619 yr Author Awesome! Thanks so much : It worked. I wonder why Filemaker doesn't like the write script. I ended up changing my applescript a bit because I was having some permissions issues with the location where the text file was being created. I just learned that an applescript from Filemaker does not need the "Tell Application "Filemaker Pro" block, so I just have Tell Database "DatabaseName" set field "fieldname" of current record to TextOfFile end tell This is great because we are running a multi-user database, with some on FM Pro 8, FM Pro 8 Advanced, and even an FM Pro 7. and the applescript would get hung up on the "Tell application "Filemaker Pro" unless I had a calculated applescript which specified which version of Filemaker the user was on. Anywho, after all that, thank you, Fenton!!
Create an account or sign in to comment