我正在使用 Applescript 自动执行 OSX Finder 中的一些任务。该脚本打开一个文件夹并选择该文件夹中的第一个图像。我希望它也能调出“快速查看”窗口(就像用户按下了空格键一样)。
我确实找到了一种使用qlmanage从命令行启动快速查看的方法,但这会打开一个静态快速查看窗口,该窗口不再与查找器选择相关联。
到目前为止的代码:
property folderPath : "/Volumes/Media/Images"
on run {}
tell application "Finder"
activate
set imageFolder to folder (folderPath as POSIX file)
set imageFile to first item of imageFolder
select imageFile
-- show quick look?
end tell
end run