我正在编写一个脚本,它将运行一个 microsoft office 安装 DMG,然后单击继续,依此类推,直到安装该程序。我已经成功地浏览了我需要按下的按钮,直到我到达同意按钮。当我单击此按钮时,辅助功能检查器会显示“(表)[NSPanel]”。我怎样才能引用这个对象?有可能吗?
tell application "Finder"
set myFolder to container of (path to me) as alias
end tell
tell application "Finder"
open document file "Microsoft_Office_16.16.19021001_Installer.pkg" of myFolder
end tell
if application "Installer" is running then
tell application "Installer"
activate
end tell
tell application "System Events"
tell process "Installer"
click button "Continue" of window "Install Microsoft Office for Mac"
click button "Continue" of window "Install Microsoft Office for Mac"
click button "Agree" outline "" of window "Install Microsoft Office for Mac"
end tell
end tell
end if