2

我正在计算 AppleScript 中的一些数据,然后将其插入到特定的 FileMaker 记录中。这是我的 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')

一切正常,除了线

set data cell "CLIP LENGTH" of MatchingRecord to ClipLength

返回的错误是

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

脚本找到正确的记录,FileMaker 字段名称肯定是“CLIP LENGTH”。我究竟做错了什么?

4

1 回答 1

4

尝试:

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")
于 2013-04-02T21:32:51.550 回答