Re: Script to get default browser?
Re: Script to get default browser?
- Subject: Re: Script to get default browser?
- From: Paul Skinner <email@hidden>
- Date: Tue, 14 Jan 2003 10:44:19 -0500
On Saturday, January 11, 2003, at 07:43 AM, Philip Aker wrote:
BTW, what is being reported (by Paul Skinner's script as well) is the
"bundle identifier" not the app's name. You can use that just as
easily to activate an application.
For those who want a more direct result this returns an alias to the
default browser. Note the trailing colon.
GetDefaultBrowser() -->alias "titan:Applications:Safari.app:"
on GetDefaultBrowser()
set creatorType to word -1 of (do shell script "defaults read
com.apple.LaunchServices | grep -C5 E:html | grep -w LSBundleSignature
")
set {text:creatorType} to (text of creatorType) as text
tell application "Finder"
(application file id creatorType) as alias
end tell
end GetDefaultBrowser
--
Paul Skinner
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.