Reputation: 111
Image of my accessibility inspector
I am writing a script that will run a microsoft office installation DMG and click continue and so on and on until the program is installed. I have been successful in navigating the buttons I need to press until I reached the Agree button. Accessibility Inspector says " (sheet) [NSPanel]" when I click on this button. How can I refer to this object? is it possible at all?
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
Image of my accessibility inspector
Upvotes: 2
Views: 358