【发布时间】:2013-02-09 04:33:06
【问题描述】:
我的妻子需要启用 Java 才能将她的考勤卡输入 ADP (grrrr),但不记得如何使用“首选项”窗格进行操作。有没有我可以用来执行此操作的脚本?
【问题讨论】:
标签: macos safari applescript automator
我的妻子需要启用 Java 才能将她的考勤卡输入 ADP (grrrr),但不记得如何使用“首选项”窗格进行操作。有没有我可以用来执行此操作的脚本?
【问题讨论】:
标签: macos safari applescript automator
我发现两个脚本合并后让我为她创建两个 Automator 服务:the core applescript,然后如何检测if the checkbox is already on or off
on run {input, parameters} -- use for both Automator services except for false/true below
tell application "System Events"
tell process "Safari"
click menu item "Preferences…" of menu "Safari" of menu bar item "Safari" of menu bar 1
click button "Security" of tool bar 1 of window 1
set theCheckbox to checkbox "Enable Java" of group 1 of group 1 of window "Security"
tell theCheckbox
set checkboxStatus to value of theCheckbox as boolean
if checkboxStatus is false then click theCheckbox
-- false for the 'Enable' script, true for the 'Disable' one
end tell
click button 1 of window "Security"
end tell
end tell
return input
end run
【讨论】: