使用Applescript播放Quicktime Player视频



所以我写了一个小脚本,打开我想播放的视频。它一打开就应该播放。我试着使用play,尽管Quicktime识别play这个词,但它实际上并没有播放。我该怎么办?

tell application "Quicktime player"
open file "/directory/to/the/file/"
play --doesn't work
end tell

如果您想使用完全限定的POSIX路径名,您可以使用以下命令打开播放文件

tell application "QuickTime Player"
activate
set thisFile to open POSIX file "/path/to/filename.mp4"
play thisFile
end tell

最新更新