使用 Applescript 的动态幻灯片
Dynamic Slideshow using Applescript
我有一个图像文件夹,该文件夹从全天定期拍摄的相机中获取更新。我正在尝试编写一些 applescript,它将从图像文件夹创建幻灯片,但也会随着添加更多图像而更新,而无需重新运行脚本。我开始尝试快速查看但无法正常工作。关于如何最好地解决这个问题有什么想法吗?
更新
这是我到目前为止一起破解的内容:
tell application "Finder" to set the_folder to get folder (choose folder)
tell application "Finder" to open the_folder
tell application "System Events"
tell process "Finder"
key code 124
keystroke "a" using command down
keystroke " " using option down
end tell
end tell
不过,如果我在幕后添加照片,我认为这不会奏效。
这是我想出的,它非常适合我的需要。
tell application "Finder" to set the_folder to get folder (choose folder)
tell application "Finder" to open the_folder
tell application "System Events"
tell process "Finder"
key code 124
keystroke "a" using command down
keystroke " " using option down
end tell
end tell
repeat while true
delay 60
tell application "System Events"
tell process "Finder"
keystroke "a" using command down
end tell
end tell
end repeat
一些注意事项...因为它正在使用快速查看,所以当它处于 运行 时你不能在计算机上做任何事情,因为当它处于 运行(发生这种情况时快速查看关闭)。还需要重复部分才能快速查看目录中的新添加内容而不会失去焦点。非常讨厌的东西,但我真的找不到另一种简单的方法来做到这一点!
我有一个图像文件夹,该文件夹从全天定期拍摄的相机中获取更新。我正在尝试编写一些 applescript,它将从图像文件夹创建幻灯片,但也会随着添加更多图像而更新,而无需重新运行脚本。我开始尝试快速查看但无法正常工作。关于如何最好地解决这个问题有什么想法吗?
更新 这是我到目前为止一起破解的内容:
tell application "Finder" to set the_folder to get folder (choose folder)
tell application "Finder" to open the_folder
tell application "System Events"
tell process "Finder"
key code 124
keystroke "a" using command down
keystroke " " using option down
end tell
end tell
不过,如果我在幕后添加照片,我认为这不会奏效。
这是我想出的,它非常适合我的需要。
tell application "Finder" to set the_folder to get folder (choose folder)
tell application "Finder" to open the_folder
tell application "System Events"
tell process "Finder"
key code 124
keystroke "a" using command down
keystroke " " using option down
end tell
end tell
repeat while true
delay 60
tell application "System Events"
tell process "Finder"
keystroke "a" using command down
end tell
end tell
end repeat
一些注意事项...因为它正在使用快速查看,所以当它处于 运行 时你不能在计算机上做任何事情,因为当它处于 运行(发生这种情况时快速查看关闭)。还需要重复部分才能快速查看目录中的新添加内容而不会失去焦点。非常讨厌的东西,但我真的找不到另一种简单的方法来做到这一点!