Shortcuts to close Adobe Window

I have a shortcut to open Adobe Acrobat DC Reader and to close the window. The problem is that the app opens but the window does not close. This works with other apps (Apple and non Apple), but Adobe seems stubborn :)

Any suggestions? Thanks






iMac Line (2012 and Later)

Posted on Oct 7, 2022 12:07 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 7, 2022 12:33 PM

I don't have Acrobat Reader, but I recall a similar problem with another app in the past.


That came down to a race condition - the way the app started, it was as if it processed the 'close every window' command too soon - before it had finished opening up.

IIRC, the trick for that one was to open the app, then tell it to close the windows - that way it finished its startup sequence and was able to close the windows.


May not be the same problem, but worth a try:


tell application "Adobe Acrobat Reader DC"
    -- open the app first
    activate
    -- then close the windows
    close every window
end tell



6 replies
Question marked as Top-ranking reply

Oct 7, 2022 12:33 PM in response to mrokloricred37

I don't have Acrobat Reader, but I recall a similar problem with another app in the past.


That came down to a race condition - the way the app started, it was as if it processed the 'close every window' command too soon - before it had finished opening up.

IIRC, the trick for that one was to open the app, then tell it to close the windows - that way it finished its startup sequence and was able to close the windows.


May not be the same problem, but worth a try:


tell application "Adobe Acrobat Reader DC"
    -- open the app first
    activate
    -- then close the windows
    close every window
end tell



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Shortcuts to close Adobe Window

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.