将数据从 AppleScript 发送到 FileMaker 记录

问题描述 投票:0回答: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”。我做错了什么?

applescript filemaker
2个回答
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")

0
投票

太好了,这很有帮助。但是我怎样才能摆脱过滤后的节目呢?如何重新恢复所有记录?

谢谢你

© www.soinside.com 2019 - 2024. All rights reserved.