以下applescript旨在使用QuickTime播放器从文件路径打开视频文件,但我不确定为什么它不起作用,因为它带有模糊不清的威胁性错误,列为“未知”。请帮助修复它。谢谢。
tell application "QuickTime Player"
set theMovie to open file ":Users:User:Desktop:Script:Video.mp4"
tell theMovie
set the presenting to true
set the looping to true
play
end tell
end tell
答案 0 :(得分:0)
HFS路径必须以卷名开头。
set theMovie to open file "Macintosh HD:Users:User:Desktop:Script:Video.mp4"
但是有相对的方法
set moviePath to (path to desktop as text) & "Script:Video.mp4"
tell application "QuickTime Player"
set theMovie to open file moviePath
...