Go to System Preferences—>Keyboard and Mouse. Click on the Keyboard Shortcuts tab. At the bottom, you'll find a pair of radio buttons, labelled "Text boxes and lists only" and "All controls". Click on the lower button, "All controls".
You should then be able to navigate all buttons as well, using the Tab key. The focus is shown as a blue border. Pressing the spacebar clicks the currently selected button.
Following your response, I looked at system pref and found the all controls solution as per your response. I even prefer your last solution which I can use for many other macros, such as opening a Pages Template.
You are very kind and … very smart ! thanks so much !
Could you do me a favor? We have just installed a new "best answer" feature (it calls it "this reply solves the problem"). At the bottom of each post you should see a checkbox that you can check indicating that you prefer that solution. Could you please check the one that you like best?
The problem with this solution and the rest of the discussion on this page is that applications use at least four wordings of the “Don’t Save” button when you close an unsaved documents, some because of the document backup system introduced a few OS-X releases earlier.
Don’t Save
Delete
Delete Copy
Revert Changes
My macro Do Don’t Save handles all four cases using an AppleScript.
I don’t like mixing “Don’t Save” with “Delete” in the same Action as alternate Button text. Perhaps they mean the same thing in most cases, but I’d rather not press the button occasionally rather than actually delete a file I didn’t want to.
I will try that again, now that I have tried a number of approaches. I don’t think a Press a Button action worked in all cases. In any case it’s a very old script and definitely worth a fresh look to see how I can accomplish this without a script.
Good point. I have a new version that first tries to find the button and if it can’t uses Found Images. It’s working well, but I have a few more examples to check.
Do me a favor, please. See if you can press that button with a KM Press a Button action. I suspect not. I have had a similar problem with Press a Button in other non-conforming applications I am going to check them again.
Please clarify. Did you mean in the same dialog, not same button? And for my own purposes I would like an example of an application where Delete and Don’t Save might be in the same dialog, and what conditions produce that. I don’t think Delete every means “Don’t Save and delete the existing file”, so I don’t see how there would be any confusion.
That’s great! I had no idea you could use patterns in Press a Button.
Suppose I couldn’t though. I am sure this has been asked before but I can’t figure out how to find it: is there any way to have a series of actions, where the series (or macro itself) is exited once one of the actions succeeds? I know I can terminate the macro on failure, but I don’t know how to do something on success.
The above macro works fine with one open tab.
How would I modify it for multiple tabs, ie make it recursive in the sense that each tab is closed in sequence until all tabs are closed.
thanks very much