使用Apple脚本编辑器运行脚本以自动执行Cisco AnyConnect登录时,我收到以下错误。
错误:“系统事件出错:不允许任何连接辅助访问。( - 25211)”
我提供的选项是编辑或确定。确定结束脚本,编辑允许我从脚本编辑器运行脚本,该脚本成功。
我已将此脚本保存为.app文件,以便从Launchpad
运行它脚本:
tell application "Cisco AnyConnect"
activate
end tell
repeat until application "Cisco AnyConnect" is running
delay 1
end repeat
tell application "System Events"
repeat until (window 1 of process "Cisco AnyConnect Secure Mobility Client" exists)
delay 1
end repeat
tell process "Cisco AnyConnect Secure Mobility Client"
keystroke ("**access URL**" as string)
keystroke return
end tell
repeat until (window 2 of process "Cisco AnyConnect Secure Mobility Client" exists)
delay 1
end repeat
tell process "Cisco AnyConnect Secure Mobility Client"
keystroke ("**the password is entered here**" as string)
keystroke return
end tell
end tell