2 Replies Latest reply on Feb 8, 2009 7:45 AM by davidanders

    moving text with applescript



      moving text with applescript


      I'm trying to move text from a Filemaker 10 field to a BBEdit document using Applescript.  The script looks something like this:


      tell application "FileMaker Pro"

      set theBody to (cell "text" of record recNum)

      tell application "BBEdit"

      make new document with properties {contents:(theBody)}

      end tell

      end tell


      Unfortunately, any hard returns in the text are lost and replaced with boxes.  I suspect that I need to specify that we are working in Unicode somehow, but so far nothing has worked.  I've tried:


      set theBody to Unicode text of (cell "text" of record recNum)




      make new document with properties {contents:(temptext), linebreaks:Unicode}


      but these both cause the script to fail with "object not found" or "can't get some object"


      Anybody know how I can fix this?  I can manually copy and paste the field from Filemaker to BBEdit just fine.


      thanks for your help!