AnsweredAssumed Answered

apple script error help

Question asked by zinny on Apr 15, 2015
Latest reply on Apr 18, 2015 by zinny


apple script error help


I have created this applescript to get the duration of a quicktime and insert it into a filemaker field but the apple script doesn't work when I have it decoupled. Mov Files::get path restructured is the filepath with : in place of / and works fine. it's Mov Files::File Name that can't be recognized by the script. the value it returns currently is

"tell application \"QuickTime Player\"¶
    open \"" & Mov Files::get path restructured & "\"¶
    tell document \" & Mov Files::File Name & \"¶
        set MovieDuration to the duration¶
    end tell¶
    close document \" & Mov Files::File Name & \"¶
end tell¶
tell application \"Finder\"¶
    display dialog \"Movie duration = \" & MovieDuration¶
end tell¶
tell application \"FileMaker Pro Advanced\"¶
    set cell \"duration raw\" of current record to MovieDuration¶
end tell

Error Message

Quicktime Player got an error:can't get document



What am I doing wrong?

also, how do I trap for Quicktime being open already and the file I want already being open?