Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've written an AppleScript that I want to set as the default browser.

I've added a CFBundleDocumentTypes section to the p-list (copied from Safari) and rebuilt the launch services database, but that didn't work.

The script doesn't show up in the Safari default browser list. If I choose it manually in that preferences dialog, it's ignored, and Safari becomes the default browser.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Have you tried adding the CFBundleURLTypes and the sub-key LSIsAppleDefaultForScheme?

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>Web site URL</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>http</string>
            <string>https</string>
        </array>
        <key>LSIsAppleDefaultForScheme</key>
        <true/>
    </dict>
</array>

Not sure that it will help, but I have noticed these keys in the info.plist of all the apps that I have checked that show up in that browser list.

share|improve this answer
    
Yes, it looks like that was the main thing I was missing. I found this article which specifically addresses the issue: macosautomation.com/applescript/linktrigger/index.html –  Dogweather Dec 10 '11 at 3:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.