This Week's Sponsor:

Winterfest 2024

The Festival of Artisanal Software


A Simple “Open In Chrome” Keyboard Maestro Macro for Safari

My problem: I haven’t installed Flash on my Mac and I sometimes need to watch YouTube videos that require Flash Player in Google Chrome. Google’s browser is my Flash shelter: Safari is my main browser and I only keep Chrome around for Flash videos. I was getting annoyed by the process of copying a URL -> launching Chrome -> pasting the URL, so I made a simple Keyboard Maestro macro to automate everything with a hotkey. I don’t know what took me so long.

The macro checks if Safari is the front window, and, if not, it displays a notification with an error message. I do this to prevent accidental hotkey presses for URLs that I don’t want to open in Google Chrome. If Safari is the front window, however, what required a bunch of steps in AppleScript to open the current Safari URL in Chrome is a single action in Keyboard Maestro: Set Google Chrome URL, using %SafariURL% as a variable.

The two additional steps –  Open Chrome and Wait For Chrome To Finish Loading – were necessary because I discovered that, when launched with a Set URL action, Chrome wouldn’t intercept the URL sent by Keyboard Maestro and would simply display a blank tab. In this way, Chrome is launched, paused for a second as it reloads open tabs or the start tab, and then the Safari URL is opened in the current tab. If you want to open the URL in a new tab, change the Set Chrome URL action to New Google Chrome Tab.

You can download the macro here.

Access Extra Content and Perks

Founded in 2015, Club MacStories has delivered exclusive content every week for nearly a decade.

What started with weekly and monthly email newsletters has blossomed into a family of memberships designed every MacStories fan.

Learn more here and from our Club FAQs.

Club MacStories: Weekly and monthly newsletters via email and the web that are brimming with apps, tips, automation workflows, longform writing, early access to the MacStories Unwind podcast, periodic giveaways, and more;

Club MacStories+: Everything that Club MacStories offers, plus an active Discord community, advanced search and custom RSS features for exploring the Club’s entire back catalog, bonus columns, and dozens of app discounts;

Club Premier: All of the above and AppStories+, an extended version of our flagship podcast that’s delivered early, ad-free, and in high-bitrate audio.