Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacScape

macrumors member
Original poster
Apr 29, 2021
35
28
Henlo,

Some time ago I found this Automator service/script on the Internet (see attachment). It works perfectly; I added this workflow in my Services folder and if I hover on a link I can right click, click on the service and the website will open in Firefox.

Question is: how can I change this to Microsoft Edge? I'm really a noob in Automator/Terminal. I'm sure I need to change [open -b org.mozilla.firefox "$@"] to Microsoft Edge, but what is the Terminal(?) name of this application? Where can I find this? Or better, what should this line be?

Hope you can help :-( Thanks.
workflow copy 2.png
 
You can get the bundle identifier of a running process via System Events.
Example :
AppleScript:
tell application "System Events"
    bundle identifier of process "Microsoft Edge"
end tell
or you can change open -b to open -a and use the application specified.
Example :
Bash:
open -a "Microsoft Edge"
open -a "/Applications/Microsoft Edge.app"

Note: I don't use Microsoft Edge so I'm guessing the name of it as it appears in the Applications folder.
 
  • Like
Reactions: MacScape
You can get the bundle identifier of a running process via System Events.

...

Aha, it's called 'bundle identifier'! Didn't know this. The bundle identifier of Microsoft Edge is apparently com.microsoft.edgemac (found it via an other way/Google. Show Package Content > Info.plist > CFBundleIdentifier). I changed the script to: open -b com.microsoft.edgemac "$@" and it works!

Your post led me to the solution and I'm really happy. Thank you!!

FYI I use Microsoft Edge as my 3rd browser to open unknown, unreliable websites or Facebook, social media pages, etc. Some kind of 'sandboxing'.
 
  • Like
Reactions: kryten2
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.