March 4, 200817 yr I think I have found a way to get at my data for the header - export field contents - but can I append a file ---- write to the same file over and over - appending without overwriting ---- how do I do that?
March 4, 200817 yr Here is an example to prepend a line of text to a text file. It will create the file (on your desktop) if it does not yet exist; otherwise it will add the line at the beginning. You would get that line from a FileMaker field. I've written this so that it will work if you don't have FileMaker set up to do it yet. So, normally you'd run it within a FileMaker Perform AppleScript, but you can run it with Script Editor to see. ttell application "FileMaker Pro Advanced" try set new_line to cell "New Line" of current record on error set new_line to "new line " end try end tell set file_spec to open for access file ((path to desktop as Unicode text) & "test_insert.txt") with write permission try set txt to read file_spec on error set txt to "" end try write (new_line & return & txt) to file_spec starting at 0 close access file_spec Edited March 4, 200817 yr by Guest
Create an account or sign in to comment