launch document problem

Kay C Lan lan.kc.macmail at gmail.com
Thu Jan 28 21:36:21 EST 2016


On Fri, Jan 29, 2016 at 1:06 AM, Peter Haworth <pete at lcsql.com> wrote:

>
> The only issue I have now is avoiding hard coding the browser to use.  Does
> anyone know of a way to find the default browser setting in OSX (this
> program will only be running on Macs).
>
> Poking around in User level
 /Library/Preferences/com.apple.LaunchServices.plist

I note org.mozilla.firefox which is my default browser. It's listed in the
first 5 (0-4) items. Maybe you could play around changing your default
browser and see what's effected and then use the hard coded syntax based on
what your read from the plist.

Just a suggestion, never tried it myself.

Another thought, but I don't know how to do it, is any html file Get Info
will list the 'Open with:' If there is some way to extract that Get Info
information all you need to do is write a html file to Temp, Get Info, and
work from there. Unfortunately whilst I know:

  put shell( "mdls" && tFilepath) into tFileInfo

will extract far more info about a file that "Get Info" reveals, the
terminal command does not list the 'Open with" info. Someone might know a
variation of mdls that includes it.



More information about the use-livecode mailing list