我想通过编程方式解锁mac。目前,我正在使用苹果脚本为这个提议。它工作得很好,但问题是它是一个耗时的过程。执行脚本大约需要4-5秒。下面是我使用NSAppleScript执行的脚本。请告诉我怎样才能让它快速工作。或者任何其他最快的方式。谢谢
tell me to activate\n
tell application \"System Events\" to keystroke \"PASSWORD\"\n
tell application \"System Events\" to keystroke return\n
tell application \"System Events\" to keystroke return"
发布于 2015-04-26 23:05:17
tell application "System Events"
tell security preferences
set require password to wake to false
end tell
end tell
tell application "System Events"
stop current screen saver
end tell
tell application "System Events"
tell security preferences
set require password to wake to true
end tell
end tell
https://stackoverflow.com/questions/29443520
复制相似问题