Have now managed to run the script, but I now have an error that reads:
error "Cant get natural dimensions of {last track of document \"file name here\" of application \"QuickTime Player\", last track of document \"file name here\" of application \"QuickTime Player\"}." number -1728 from...