【发布时间】:2016-05-12 02:24:37
【问题描述】:
好的,这个脚本的目标是让它每 1 秒将时间倒退 1 秒。所以在某种程度上它是mac上的停止时间。我已经深入剧本了。 () 中的注释是脚本应该执行的操作。也就是你帮助我的地方。
set pasword to ("my password")
tell application "System Preferences"
activate
end tell
delay 3
tell application "System Events"
tell process "System Preferences"
click menu item "Date & Time" of menu "View" of menu bar 1
delay 2
tell window "Date & Time"
(click the authentication lock.)
tell application "System Events"
keystroke pasword
delay 1
tell application "System Events"
keystroke return
delay 1
(uncheck the set time data and time automatically checkbox)
delay 1
repeat
(select the seconds above the clock)
(click the top arrow right next to it)
(click save)
delay 1
end repeat
end tell
end tell
end tell
end tell
end tell
所以整个脚本,我只是卡在这些区域,我正在寻找一些帮助。谢谢。
【问题讨论】:
-
你为什么保留
tell system eventsing。你有没有尝试记录我的选项 -
@Kamin Pallaghy 如果您在谈论顶部的记录按钮选项,那么是的。它甚至没有记录我打开系统偏好,更不用说所有其他小事了。你自己试过吗?因为对我来说它不起作用。
标签: macos applescript osx-yosemite