Adobe Reader has N documents open. One of them has a known filepath and title and it needs to be programmatically closed. How to go about doing this in AppleScript? Specifically, how can I:
- Talk to Reader
- Access a list of documents currently opened
- Select the document I need to close among the list above (I know: document path on the filesystem and document title, not necessarily "position" (e.g. frontmost, background, 3rd tab, or similar) or order in which it was opened)
- Give Reader the command to close the file, not changing the active/frontmost document if the document to close was not in front of the user. Remembering which one was active, quickly switching to the one to close and back to the previous one is acceptable if it can be done almost imperceptibly
Hopefully this is a precise definition of the task, thanks for your help.