Quicksilver可访问的脚本,用于禁用和启用Time Machine?


Answers:


2

刚刚意识到我可以将它从我用来检测显示的另一个脚本中复制出来。

他们来了:

禁用:

tell application "System Preferences" to activate
    tell application "System Events"
        tell process "System Preferences"
                click menu item "Time Machine" of menu "View" of menu bar 1
                tell button "OFF" of window 1 to click
        end tell
    end tell
tell application "System Preferences" to quit

启用:

tell application "System Preferences" to activate
tell application "System Events"
        tell process "System Preferences"
                click menu item "Time Machine" of menu "View" of menu bar 1
                tell button "ON" of window 1 to click
        end tell
end tell
tell application "System Preferences" to quit

希望能帮助别人。如果有更好的解决方案,我全都耳朵!


1

您还可以使用此AppleScript启动Time Machine备份:

do shell script "/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper &"

或使用类似的shell脚本。

我认为Time Machine会运行 办法 太频繁。相反,我将Time Machine禁用并使用 觉醒 每天运行此脚本两次。


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.