Can anyone help me? Even after rebuilding InDesign’s preference file, this script still shows ‘0 open documents,’ even though that’s not the case.
tell application id "com.adobe.InDesign"
activate
if (count of documents) > 0 then
display dialog "There are " & (count of documents) & " open documents."
else
display dialog "No documents are open"
end if
end tell
I also have a similar issue where script editor “doesn’t understand the close message” for a simple script such as this:
tell application id "com.adobe.InDesign"
activate
close document 1 saving no
end tell
I’m completely stumped and not sure what might be causing the issue on my computer or how to resolve it.
There are no such changes in InDesign. @Jeffkr’s scripts should work perfectly fine as they are. There’s some kind of anomaly which, hopefully, will be solved soon.
I really appreciate both of you responding. I wasn’t able to pinpoint the exact root cause, but it all started with a cloned machine. Coincidentally, during my troubleshooting, the issue was temporarily resolved by swapping InDesign preference files from another machine. However, the problem returned shortly after. Ultimately, I decided to re-image the Mac, which seems to have resolved the issue completely. Hopefully, it won’t return.