www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Opening browser and url.

reply "Bauss" <jj_1337 live.dk> writes:
In other programming languages you can open a website in the 
default browser by spawning a process using the url, but it does 
not seem to work with D using spawnProcess().

Do I have to do API calls to get the default browser and then 
call spawnProcess() with the url as an argument or is there a 
standard D way.

I tried it like the following
spawnProcess("http://www.x.x/");
Jun 25 2015
parent reply "MrSmith" <mrsmith33 yandex.ru> writes:
On Thursday, 25 June 2015 at 14:02:41 UTC, Bauss wrote:
 In other programming languages you can open a website in the 
 default browser by spawning a process using the url, but it 
 does not seem to work with D using spawnProcess().

 Do I have to do API calls to get the default browser and then 
 call spawnProcess() with the url as an argument or is there a 
 standard D way.

 I tried it like the following
 spawnProcess("http://www.x.x/");
http://dlang.org/phobos/std_process.html#.browse
Jun 25 2015
parent "Bauss" <jj_1337 live.dk> writes:
On Thursday, 25 June 2015 at 14:05:54 UTC, MrSmith wrote:
 On Thursday, 25 June 2015 at 14:02:41 UTC, Bauss wrote:
 In other programming languages you can open a website in the 
 default browser by spawning a process using the url, but it 
 does not seem to work with D using spawnProcess().

 Do I have to do API calls to get the default browser and then 
 call spawnProcess() with the url as an argument or is there a 
 standard D way.

 I tried it like the following
 spawnProcess("http://www.x.x/");
http://dlang.org/phobos/std_process.html#.browse
Thank you, how could I have not seen that!
Jun 25 2015