Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to get the default web browser name on mac with Applescript??

Hi All,

is their any way to get the deafult web browser name on Mac, in my case always deafult browser will be changing, so I need to get the name of deafult browser programatically. Pls suggest..

Mac OS X (10.7.4)

Posted on Dec 4, 2012 6:07 AM

Reply
5 replies

Dec 4, 2012 5:01 PM in response to madhusudhanjr

Hello


Here's another way you may try.


--SCRIPT
set rb to "# get bundle id of default browser
require 'osx/cocoa'
include OSX
url = NSURL.URLWithString('http://aaa.bbb.ccc')
app = NSWorkspace.sharedWorkspace.URLForApplicationToOpenURL(url)
puts NSBundle.bundleWithPath(app.path).bundleIdentifier
"
return do shell script "/usr/bin/ruby -e " & rb's quoted form
--END OF SCRIPT


Regards,

H

how to get the default web browser name on mac with Applescript??

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.