Page 1 of 1

Opening the default browser in a URL

Posted: Sat Dec 07, 2013 12:10 pm
by marcoagpinto
Hello!

ts-soft explained how to open the default browser in Linux and Windows.

Does anyone know how to do it in Mac?
ts-soft wrote:

Code: Select all

CompilerSelect #PB_Compiler_OS
  CompilerCase #PB_OS_Linux
    RunProgram("xdg-open", "http://marcoagpinto.cidadevirtual.pt/proofingtoolgui.html", "")
  CompilerCase #PB_OS_Windows
    RunProgram("http://marcoagpinto.cidadevirtual.pt/proofingtoolgui.html")
  CompilerCase #PB_OS_MacOS
    ;???
CompilerEndSelect
Thanks!

Kind regards,
>Marco A.G.Pinto
----------------

Re: Opening the default browser in a URL

Posted: Sat Dec 07, 2013 8:40 pm
by DK5UR
Hi Marco,
Should be
RunProgram("open", "http://www.purebasic.com", "")

cu Heinz

Re: Opening the default browser in a URL

Posted: Sun Dec 08, 2013 12:13 am
by marcoagpinto
DK5UR wrote:Hi Marco,
Should be
RunProgram("open", "http://www.purebasic.com", "")

cu Heinz
Thanks :mrgreen:

Edit: Heinz, what name shall I add to the credits of my open-source tool in January? "Heinz"?

Re: Opening the default browser in a URL

Posted: Sun Dec 08, 2013 2:43 am
by DK5UR
You can add DK5UR or Heinz Urban, but at least it's not necessary ;-)