Support for Arc Browser

Hi :wave:

There is a new browser - Arc from The Browser Company. After a few months of using it, I have to say "it's a perfect browser" but there is one piece which is missing already which is a Keyboard Maestro support.

This browser is based on Chromium, so I guess it may be possible to make actions like "Execute JavaScript in Front Browser" work in Arc. The same goes with tokens like %FrontBrowserURL%

@peternlewis is there any chance to get Arc Support in upcoming updates? Is there something you may need from them to do so? I may help with that.

4 Likes

If the browser supports the same AppleScript commands as Chrome, then you can add the bundle ID as a supported Google Chrome browser as described in the Preferences user manual section.

Specifically with Terminal commands like:

defaults write com.stairways.keyboardmaestro.engine AppleScriptGoogleChromeBundleID -string "com.google.Chrome.canary"
defaults write com.stairways.keyboardmaestro.engine BrowserGoogleChromeName -string "Chrome Canary"

If it works, you can let me know when the bundle ID is and then I'll add it as a supported Chrome front browser.

1 Like

Thank you, here are settings.

defaults write com.stairways.keyboardmaestro.engine AppleScriptGoogleChromeBundleID -string "company.thebrowser.Browser"

defaults write com.stairways.keyboardmaestro.engine BrowserGoogleChromeName -string "Arc"

I've tested it and Tokens and Execute JavaScript in Front Browser works, but if I want to return any value from JavaScript (and save it to a variable) I get nothing - JS snippet works, but returned value is empty (missing value)

This "missing value" is visible in Script Editor:

I've tested this in a many various ways, but no luck.

Dictionary for Arc looks the same to me like Chrome / Brave. Also the same macro returns a value from those browsers but not from Arc.

Do you have any clue why there is no returned value?

1 Like

Sounds like an issue for the browser, perhaps badly implemented AppleScript, or perhaps some sort of “security” design.

You will need to talk to the developers and explain your requirements and what isn't working and see what they have to say.

2 Likes

I already did, waiting for a response. Will let you know.

Thank you!

Meanwhile if somebody is interested, I have a workaround for this and recorded a video which includes an explanation:

3 Likes

Came here to ask the same question…hmm. I can make this workaround work, but for the number of scripts I already have written…not sure it's worth it. Thanks for the example!

2 Likes

Any news on this? Came to ask the same thing. strike that, too soon.

I tried getting a var from Arc by resetting my settings like stated in this thread and I got title and url from the current page back from Arc with document.title and window.location.href

So it seems to work now!

1 Like

Yeah, it seems like everything is working in Arc right now, even returning values from scripts.

1 Like

Arc AppleScript API is available here

1 Like

Great news! I'm willing to try it out now.

Hopefully one day, I wish we will have it natively in KM.

There won't be dedicated actions, but you can add Arc to the Front-Browser actions yourself.

manual:Preferences [Keyboard Maestro Wiki]

Search for this:

“Add additional Browsers to the Front Browser Actions, Tokens, and Functions.”

Since Arc is based on Chromium, Peter will certainly add it to the supported browser list at some point – provided it takes off of course (and I think that very likely).

I'm still on the waiting list...

1 Like

When I try to find the BundleID for the Arc browser it returns "com.apple.Safari". I am triggering this with Arc as the front browser. Am I misunderstanding this token?

image

As I said – Arc is NOT supported by Keyboard Maestro at this time.

Therefore KM's front browser tokens won't work with it...

Make sure the process name for Arc is correct in the script below, and run it in Script Debugger or Apple's anemic Script Editor app.

tell application "System Events"
   tell application process "Arc"
      return bundle identifier
   end tell
end tell
1 Like

I tend to think in scripted solutions, so I forgot this task is easy to do with a Keyboard Maestro native solution.


Download: Get Bundle ID of Front Application v1.00.kmmacros (6.4 KB)

Macro-Image

Keyboard Maestro Export

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2

2 Likes

Bundle ID for Arc is company.thebrowser.Browser

Thanks. Both of @ccstone methods work.

I followed the wiki and entered the following commands and now KBM recognizes Arc.

defaults write com.stairways.keyboardmaestro.engine AppleScriptGoogleChromeBundleID -string "company.thebrowser.Browser"
defaults write com.stairways.keyboardmaestro.engine BrowserGoogleChromeName -string "Arc Browser"

image

2 Likes

I just checked an Arc does not appear to support compatible AppleScript control and behaviour with Chrome. It may be similar, and may working in some cases, but it is not the same. For example, the New Front Browser Window action (with a specified URL) does not appear to work the same.