Recognizing Brave Browser as Frontmost Application

I have a macro that copies the URL Title and URL of the frontmost web page to a variable that works in Safari, Chrome and Firefox but not Brave.

Setting "This Application" to "Brave Browser) from the choices offered in the dropdown list and "Is at the front" results in (currently false) even if the Brave Browser is the current application.

Anyone know of a possible cause or have a solution?

Thank you ...

Chrome and Safari are well behaved
Firefox is not, which why there are not special Firefox open url etc
Brave may not be good, bad, or terrible.
But that is probably why you are having problems
PS I have not used Brave so this is a general comment

How about trying a test like this?

I have been using Brave Browser since KM 9 was released, and it has always worked well with KM. Note that this DOES require KM 9.0+. Are you using these KM Tokens when Brave is the frontmost app:


1 Like

Thanks very much for your reply.

This is the sequence of steps specific to the Brave Browser.

It's a copy of earlier steps that work for Safari and Chrome.

Forgot to mention that I am using the latest version of KM 9.0.5 on Mac OS Catalina 10.15.4.


As I showed here:

See FrontBrowser Tokens

1 Like

Thank you very much.

That's exactly what I needed.

Scott C

1 Like

Brave is a variant of Chrome, so if you configure it the Keyboard Maestro Engine will use Brave for the GoogleChrome tokens.

The FrontBrowser tokens accept any of the Safari or Chrome variants (including Brave) that Keyboard Maestro knows about.


I have some AppleScript code that doesn't work if I switch "Safari" to "Brave Browser" [otherwise it all works perfectly]

Do any of these comments about Brave apply to AppleScript?

I'm pretty confused by all of this!

That's not surprising, since Safari's and Brave's (Chrome's) AppleScript dictionaries are not compatible.

Not exactly.

The topic is about recognizing Brave as the front browser and Keyboard Maestro's Front-Browser tokens/actions.

The only tie-in is that most of those functions use AppleScript behind the scenes.

1 Like

Thanks for the response [that explains a LOT]!

Is there a good Chrome specific AS dictionary that you could point me to?

AS Dictionaries are an intrinsic part of a scriptable app, describing the AS "vocabulary" that particular app can understand.

In Script Editor, "File" menu then "Open Dictionary...", select "Google Chrome" (or whatever app you are interested in) and click "Choose" to view the Dictionary.

1 Like

Drop the given app onto Apple's anemic Script Editor app or better yet Script Debugger.

Plug for Script Debugger

When writing and testing AppleScript on macOS I advise folks to use Script Debugger – even if they don't write much AppleScript.

I've used it for 26 years plus and cannot begin to express how much it changed the AppleScript experience for me.

The commercial version is not inexpensive ($99.99), BUT it reverts to its FREE β€œLite” version after a 30 day demo period – and the free version still beats the utter pants off of Apple's Script

I use LaunchBar to do this most of the time.

1 Like