David,
The script works great, however one thing I would tweak would be to change the application versions to their bundle id’s to eliminate needing to update the year throughout the script every time you update InDesign and Photoshop.
Change Application version lines
tell application 'Adobe Photoshop 2023"
and tell application "Adobe InDesign 2020"
(or which ever year of the applications you are running, these were just the years that were in the version of the script I downloaded)
to bundle id’s
tell application id "com.adobe.Photoshop"
and tell application id "com.adobe.InDesign"
Maybe consult with Rob Day about this, he may have a reason why he didn’t do this, but it sure would save a lot of head aches and people having to modify the script.