Launch browser

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
marcoagpinto
Addict
Addict
Posts: 1045
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Launch browser

Post by marcoagpinto »

Why can't Freddy code a command that works in the three OSes to launch the browser?

So far, one has to use:

Code: Select all

    url$="http://marcoagpinto.cidadevirtual.pt/proofingtoolgui.html"
    CompilerSelect #PB_Compiler_OS
      CompilerCase #PB_OS_Linux
        RunProgram("xdg-open",url$,"")
      CompilerCase #PB_OS_Windows
        RunProgram(url$)
      CompilerCase #PB_OS_MacOS
        RunProgram("open", url$, "") 
    CompilerEndSelect


Why not a command?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Launch browser

Post by Fred »

As you posted, you can easily do it in PB with a few commands, so why adding one single command for it ? And this too specific, why not a command to launch a Notepad, or a Calculator ? If we start to add simple commands like that, the commandset will be too big.
Post Reply