【发布时间】:2017-06-06 04:02:58
【问题描述】:
我正在尝试从 Automator 运行一个 AppleScript,以重新启动我的 AirPort Extreme。 Automator 脚本是日历警报类型。当我直接从 Automator 运行脚本时,它工作得很好。当日历触发 Automator 时,我得到以下信息:
“运行 AppleScript”操作遇到错误
我已确保脚本本身、Automator 等...都可以在安全和隐私 -> 可访问性中访问。我尝试从 applescript 中删除任何 delay。我不知所措。我很感激任何有助于解决问题的想法。谢谢!
这是我尝试与 Automator 一起使用的 applescript:
activate application "AirPort Utility"
delay 4
tell application "System Events"
click image 2 of group 1 of scroll area 1 of window 1 of application process "AirPort Utility"
delay 3
click menu item 3 of menu "Base Station" of menu bar 1 of application process "AirPort Utility"
delay 1
keystroke tab
keystroke tab
keystroke space
end tell
delay 300
tell application "AirPort Utility" to quit
【问题讨论】:
-
您是否添加了日历应用程序和机场实用程序以在可访问性首选项中也允许访问?也可能在 AppleScript 中的所有击键之间添加延迟?
-
谢谢。我添加了机场实用程序。将添加日历应用程序。另外,我尝试在击键之间添加一些延迟。我会回来报告的。
标签: macos applescript automator