3 Replies Latest reply on Nov 19, 2007 7:45 PM by Newsgroup_User

    Problem with opening default web browser

    down_spiral69
      I'm not sure if this is directly related to Director, but I'm not sure where else to ask about this...

      In the software that we sell (developed in Director), there's an option to set a default web browser for opening various websites through the program. However, one of our clients has selected Safari as their default web browser, but the program insists on opening Dreamweaver instead. Has anyone else encountered a similar issue with their programs?

      The client's using Mac OSX, and both Safari and Dreamweaver are in the Applications folder on the main hard drive. When the client tries to open a HTML page that's saved to their computer, it apparently opens in Safari.
        • 1. Re: Problem with opening default web browser
          Level 7
          How do you present the option to set the default browser, how do you
          "remember" which was chosen, and how do you open this broswer when
          required? Relevant code samples would help.
          • 2. Re: Problem with opening default web browser
            down_spiral69 Level 1
            Here's a sample of the code for setting the image editor:


            on gsSetupExternalEditor DoReset
            tempPreferedEditorPath = ""
            if (gPreferedEditorPath = "") or (DoReset=TRUE) then
            ShowMuiAlert "Action", "In the next window please select you preferred image editor. This will most likely be PhotoShop or similar.", #OK
            if the machinetype = 256 then
            tempPreferedEditorPath = fileXtra.fx_FileOpenDialog(baSysfolder("program files"), "*.exe", "Choose the external editor",true,true) -- set the filter mask (Win)

            else
            tempPreferedEditorPath = baGetFileName("Open",baSysFolder("apps"),"","APPL ",0,"Choose Editor",false,100,100)

            end if
            end if
            if tempPreferedEditorPath = "" then abort
            gPreferedEditorPath = tempPreferedEditorPath

            gLastFolderPath = gsFindFolderPart(gPreferedEditorPath)
            if char gPreferedEditorPath.chars.count of gPreferedEditorPath = gPathSep then
            gPreferedEditorPath = char 1 to gPreferedEditorPath.chars.count -1 of gPreferedEditorPath
            end if

            member("fImageEditorPath").text = string(gPreferedEditorPath)
            end gsSetupExternalEditor


            The code is called by a clickable text field, and the editor information is saved into a text file, which is loaded when the program opens. Do you think it would help to include a sample of the code used to call the external program?
            • 3. Re: Problem with opening default web browser
              Level 7
              > The code is called by a clickable text field, and the editor information is
              > saved into a text file, which is loaded when the program opens. Do you think it
              > would help to include a sample of the code used to call the external program?

              Yes I do. It would also help if you showed an example of the path stored
              - particularly that stored from one of the machines that exhibits the
              problem you described.