I’ve seen people wanting to get a user’s default web browser or their default application for another file. I recently need this too. I wrote a command line tool to do this. You can pass in a file extension or the path to a file to the tool and it will return the path to the application that will launch it.
You can get the tool from my website here.
So for example, if you wanted a user’s default web browser you could do this…
set daPath to (path to home folder as text) & "UnixBins:DefaultApplication"
set theExtension to "html"
do shell script quoted form of POSIX path of daPath & " -ext " & quoted form of theExtension