Can we use "AXSubrole", "AXRoleDescription" in applescript? If yes, what is the correct way? I tried following code.
-- open Excel -> VB Editor
tell application "System Events"
tell process "Microsoft Excel"
tell window 1
if ((value of attribute "AXSubrole") is equal to "AXStandardWindow") Then
-- do something here
end if
end tell
end tell
end tell
But gives error "Can't get AXSubrole". Thanks.