0

我的妻子需要启用 Java 才能将她的考勤卡输入 ADP (grrrr),但永远不记得如何使用“首选项”窗格进行操作。有没有我可以用来执行此操作的脚本?

4

1 回答 1

0

我发现了两个脚本,合并后让我为她创建两个 Automator 服务:核心 applescript,然后如何检测复选框是否已打开或关闭

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
于 2013-02-23T17:04:08.207 回答