• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Script to get default browser?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Script to get default browser?
      • From: Mr Tea <email@hidden>
References: 
 >Re: Script to get default browser? > Philip (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: unicode escape sequences in AppleScript strings
  • Next by Date: Re: Exiting a repeat
  • Previous by thread: Re: Script to get default browser? > Philip
  • Next by thread: Re: Script to get default browser?
  • Index(es):
    • Date
    • Thread