How to Select the “OK” Button via Keyboard for Text Dialog Boxes (macOS)

Screen Shot 2018-09-03 at 4.48.58 PM

So if you’ve been using my macOS tip to append a text file using Automator and shell scripts, you’ve no doubt run into two frustrations: the window is not brought to front focus, allowing immediate typing, and the OK button isn’t accessible via the keyboard (typing Return only inserts a line break, attempting to Tab to the button just inserts a tab character in the text field).

The OK button is a simple keyboard shortcut: the Function key (fn) + the Return key.

I’ve updated the above post to include the simple AppleScript step in Automator that will bring the window to front-most focus.


Invoke PopClip Via Keyboard Using AppleScript, Automator and OS X Services

A tweet from the PopClip developer directed me to the PopClip User Guide to take advantage of a feature I’ve been wanting in the app for some time: the ability to invoke PopClip via the keyboard.

The method uses AppleScript and the code is super simple:

tell application "PopClip" to appear

The documentation suggests using a few third-party “launcher” utility apps, but I’ve discovered a way to do so with just OS X, using Automator and OS X Services. Here’s how I did it. Continue reading “Invoke PopClip Via Keyboard Using AppleScript, Automator and OS X Services”