2013-04-02 2 views
2

AppleScript에서 특정 FileMaker 레코드에 삽입하고 싶은 데이터를 계산 중입니다. 여기 내 애플 스크립트입니다 :AppleScript에서 FileMaker 레코드로 데이터 보내기

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", ... }.*) 

스크립트는 바로 기록을 발견하고, 파일 메이커 필드의 이름입니다 확실히 "CLIP LENGTH"입니다. 내가 도대체 ​​뭘 잘못하고있는 겁니까?

+0

당신은 또한 ClipLength하는 MatchingRecord의 세포 "CLIP 길이"의 cellValue을 설정하려고 했습니까? –

답변

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") 
+1

작동! 고맙습니다! – 3hough