I have an Applescript that successfully clicks the Replace button in the InDesign Save As dialog, but the same script doesn't work in Photoshop. It fails on the click command in this section of the script:
tell application "System Events" to tell process activeProcess
click button "Replace" of sheet 1 of front window
end tell
with this message:
Can't get sheet 1 of window 1 of process "Adobe Photoshop CC 2018": invalid index
Here's what the Accessibility Inspector shows for the Replace button: I've tried various approaches to identifying the sheet, none of which have worked. Any suggestions?
Just to be thorough, here's what the Save As dialog looks like when the Replace button is available:
Thanks for your help!