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 Reuben_Test_Clip_Prores422.mov
"tell application \"QuickTime Player\"¶
open \"" & Mov Files::get path restructured & "\"¶
tell document \" & Mov Files::File Name & \"¶
set MovieDuration to the duration¶
close document \" & Mov Files::File Name & \"¶
tell application \"Finder\"¶
display dialog \"Movie duration = \" & MovieDuration¶
tell application \"FileMaker Pro Advanced\"¶
set cell \"duration raw\" of current record to MovieDuration¶
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?