How can I open URL - in either Chrome or Firefox or Brave Browser?

Hi all,

How can I create a shortcut to open apple.com in Chrome, Firefox, or Brave?

I know I can easily do this with AppleScript…

tell application "Google Chrome"
	activate
	tell window 1
		make new tab at end of tabs with properties {URL:"https://www.apple.com/"}
	end tell
end tell

However I was trying to use shortcuts tools to do this

I used URL tool and set to https://www.apple.com

Then I used open URLs - and the shortcut did go to apple.com in the default Safari app

But when I tried to use different browsers the technique below failed - with various errors like the app is not installed etc.

Using Shortcuts App

For Chrome:

Use googlechrome://www.apple.com in the “Open URLs” action.

For Brave:

Use brave://open-url?url=https://apple.com in the “Open URLs” action.

For Firefox:

Use firefox://open-url?url=https://apple.com (support may vary).

I’m just curious if it’s possible to get this working without using AppleScript ?

Thanks Dave

Can you perhaps try using Shortcuts with Velja? See the end of this document.

I was going to say Choosy. :slight_smile: It lets you do cool routing stuff based on which website, etc.

Thanks guys - those apps look cool. So outside of Applescript - and these apps, is there any way to accomplish this in shortcuts?

I think Firefox doesn’t support AppleScript, so you can’t script it. Maybe the same for Chrome and Brave, I don’t know because I don’t use these browsers.

You can open a link in Firefox with Shortcuts, using a Shell Script.

2 Likes

Thanks FrankV - I will give it a try.

1 Like

Similarly, I use OpenIn for this. It is in Setapp.

1 Like

I’ve moved to OpenIn, so much more powerful.
For example, I created a rule which strips awstrack guff from links before opening :slight_smile:

1 Like