AnsweredAssumed Answered

Applescript and Filemaker -- another possible bug

Question asked by edusouza on Jul 15, 2009
Latest reply on Jul 15, 2009 by edusouza


Applescript and Filemaker -- another possible bug

Description of the issue

Hello, I'm using FileMaker Pro Advanced version 10.0v1 running on an iMac PPC G5 single with 2 GB RAM and OS X Tiger (10.4.11 85165). I'm developing a solution that uses several AppleScripts to perform some external routines. One of these actually saves the content of the clipboard -- data previously copied by FileMaker -- into a faceless TextEdit document. I first tested the script with Script Editor, and it worked without any problems; yet, when I tried to accomplish the same task using the "Perform AppleScript" step, FileMaker returned an error.Below, I place the codes. FileMaker Script is fairly simple:Allow User Abort [off]Copy [Select; field's name]Perform Applescript [FileMaker will neither allow the AppleScript to be inserted as "Native" nor run it as "Calculated Script"  Now, the AppleScript:set thisText to the clipboardset curdate to (current date) as stringset logMessage to "Login: " & tab & curdate & returnset completeLog to logMessage & return & thisTextset output_file to (path to desktop as text) & "nossolog.txt"try     open for access file output_file with write permission     write completeLog & return to file output_file starting at eof     close access file output_fileon error     close access file output_fileend try The message FileMaker Pro Advanced returned when I tried to insert this code as "native" Applescript was: "Expected End of Line, etc, but found Identifier", followed by highlighting the variable "completeLog" on line 8. I then tried a simple workaround: I inserted the AppleScript into a Global Text Field and placed this field into the scripstep as a "calculated script". The script did not work as well; however, this time FileMaker returned two messages: the "Expected ... Identifier" one, followed by "Unknown Error: - 2741".On a final note: I'm using Script Editor version 2.1.2 (81.1) running AppleScript 1.10.7.I hope this may have helped to improve FileMaker. Regards,   Eduardo Souza