Sending data from AppleScript to FileMaker records

*爱你&永不变心* 提交于 2019-12-08 02:13:49

问题


I'm computing some data in AppleScript that I'd like to then insert into a specific FileMaker record. Here's my AppleScript:

on sendDataToFM(FileNameWithExtension, ClipLength)
    tell application "FileMaker Pro Advanced"

        show every record of database 1
        show (every record whose cell "File Name" = FileNameWithExtension)

        repeat with i from 1 to (count record)
            set MatchingRecord to record i
            set data cell "CLIP LENGTH" of MatchingRecord to ClipLength
        end repeat

    end tell
end sendDataToFM

...

my sendDataToFM('Some Video.mov', '00:01:22.55')

Everything works except the line

set data cell "CLIP LENGTH" of MatchingRecord to ClipLength

The error returned is

(*Can’t get cell "CLIP LENGTH" of {"Some Video.mov",  ... }.*)

The script finds the right record, and the FileMaker field name is definitely "CLIP LENGTH". What am I doing wrong?


回答1:


Try:

on sendDataToFM(FileNameWithExtension, ClipLength)
    tell application "FileMaker Pro"
        show (every record of current table whose cell "File Name" = FileNameWithExtension)
        repeat with i from 1 to (count record)
            set cell "CLIP LENGTH" of (record i) to ClipLength
        end repeat
    end tell
end sendDataToFM

my sendDataToFM("Some Video.mov", "00:01:22.55")


来源:https://stackoverflow.com/questions/15772345/sending-data-from-applescript-to-filemaker-records

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!