I haev the apple script that makes the right click on selected event.
tell application "System Events"
set frontApp to name of first process whose frontmost is true
tell application process frontApp
try
set theSelection to value of attribute "AXFocusedUIElement"
tell theSelection
set defaultAction to perform action "AXShowMenu"
if defaultAction is missing value then
tell (first group whose selected is true) to perform action "AXShowMenu"
end if
end tell
on error errMsg number errNum
display alert errMsg & return & return & errNum
end try
end tell
end tell
And since yesterday it gets broken. It recalls the right click menu but than says
"System Events got an error: Can’t get group 1 of outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window "Send and track" of application process "Finder" whose selected = true. Invalid index.
-1719
"
Any idea why?