Monday, June 21, 2021 [Tweets] [Favorites]

Reimplementing Security Code AutoFill

Tyler Hall:

I’m very, very close to writing a KeyboardMaestro macro to grab the latest 2FA code from to work around this.

Tyler Hall:

Here’s what ended up working.

Click the menubar’s clock to activate Notification Center.


Take a screenshot.


OCR the text contained in that cropped image, which should hopefully contain our two-factor code.


Extract the code using a shell script.


Type the code into the current app (probably your non-Safari browser).


Update (2021-06-29): Keyboard Maestro:

Nice macro. FYI, I can crop from the right side using the SCREEN function. Or OCR directly from the cropped area using the Area option and the IMAGE contextual function, or combine both directly.


Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment