Rit*_*ose 5 reboot osx-snow-leopard macos
当我点击重启时,一两秒后,一切都关闭了,机器重新启动。但有时,在那一秒内,我意识到我真的不想在那个时候重新启动。我怎样才能阻止机器在那个时候重新启动?
我能想到的最好方法是在需要保存某些内容时取消保存请求,但情况并非总是如此。
如果你真的很快,你可以打开一个终端窗口并输入
sudo killall shutdown
Run Code Online (Sandbox Code Playgroud)
那可能有用。否则,请快速打开一个总是询问您是否真的要退出的应用程序。您可以使用 applescript 制作这样的应用程序:
on quit
display dialog "Really shut down?" buttons {"No", "Yes"} default button "no"
if the button returned of the result is "Yes" then
continue quit
end if
-- If I don't continue the quit, the app will keep running.
end quit
Run Code Online (Sandbox Code Playgroud)
将其输入到applescript 编辑器中并将其另存为应用程序,然后将其放在方便的地方。
注意。这两种方法可能都不起作用。我懒得知道他们是否这样做了,因为这可能需要重新启动几次。