使用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

一些警告...由于它使用快速外观,因此您在运行时无法在计算机上真正执行任何操作,因为它在运行时无法激活任何其他应用发生)。另外,需要重复部分以快速查看以挑选目录的新添加而不会失去焦点。非常讨厌的东西,但我真的找不到另一种简单的方法!

最新更新