I am trying to play a movie fullscreen one time, then close the player programmably. I have tried using QTMovieView, command line and AppleScript and found the Applescript is the most simple way.
但是,因为我真的不知道 Applescript, 我不能让快速汽车关闭 电影播放后。
Everything works fine but the "done" was unrecognized in the repeat line. Here is the script with this error:
错误“ QuickTime Player 获得错误: 无法将文档 1 完成为类型分解符。” 编号 - 1700 从文档 1 完成到 分解符 。
tell application "QuickTime Player"
activate
open "/Users/...real path of the movie.mov"
present document 1
play document 1
repeat until (get done of document 1)
end repeat
delay 2
close document 1
end tell
最后,我改成这样,可以吗?
tell application "QuickTime Player"
quit
end tell
tell application "QuickTime Player"
activate
open "/Users/.../...mov"
tell document 1
present
play
repeat until playing is false
end repeat
delay 2
close
end tell
quit
end tell
新问题: 应用程序在视频完成前挂起 。