Pen*_*lio 4 applescript automation
我是Apple的新手,目前卡在访问提示窗口,要求输入密码.
我正在为我的日常使用应用程序创建一个启动器,我想自动启动启动过程.
现在,我只推出了两个应用程序VirtualHostX和MAMP.后来我可能会添加一些.
这是我到目前为止所做的:
tell application "VirtualHostX" to activate
tell application "MAMP" to activate
tell application "System Events"
tell process "VirtualHostX"
tell menu bar 1
tell menu bar item "Web Server"
tell menu 1
click menu item "Start"
end tell
end tell
end tell
end tell
end tell
Run Code Online (Sandbox Code Playgroud)
启动时,它将成功启动两个应用程序,但虚拟主机将询问我的密码以进行授权.我想在流程或代码中集成输入密码.我已经尝试谷歌寻求答案,但未能找到解决方案.
我似乎无法定位该窗口并输入我的密码.

让我知道我错过了什么.
谢谢.
密码对话框由SecurityAgent显示:
tell application "System Events" to tell process "SecurityAgent"
set value of text field 2 of scroll area 1 of group 1 of window 1 to "password"
click button 2 of group 2 of window 1
end tell
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5112 次 |
| 最近记录: |