Filemaker Pro 7 applescript issue

Joined
May 29, 2010
Messages
1
Reaction score
0
Points
1
I'm trying to write the field contents of a container field to a file.
The container field contains an embedded image.

Here's my code:

Code:
set the_file to (((path to desktop) as string) & "fmp_output.csv") as file specification
set _output to ""
set _data to ""
set _item to ""

try
    open for access the_file with write permission
on error
    try
        close access the_file
    end try
end try

tell application "FileMaker Pro"
        tell document DB           
            repeat with i from 1 to (count records)
                tell record i
                    set _item to (get data cell "Item")
                    set _data to (get data cell "Picture")                 
                   set _output to _output & "\n" & _item & "," & _data                   
                end tell
            end repeat
        end tell
    end tell

try
    write (_output) to the_file starting at 0
    close access the_file
    "File Written"
end try


When I try this I'm getting an error. See attached file for the error.
My aim is to write the container field as a hex value into the file.

Thank you for your support.

View attachment error.txt
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top