How do I open the "default" browser?

Get help using Construct 2

Post » Mon May 25, 2015 6:52 pm

I made a button linking to our website, in the game menu (game is running in NW.js), but it opens an undefined windowed browser, not my default browser (chrome). I want it to use the user's default browser, how can i archieve it? :roll:
B
63
S
22
G
4
Posts: 357
Reputation: 6,503


Post » Tue May 26, 2015 1:34 am

It's a different problem!
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Tue May 26, 2015 7:53 am

Dan please explain may be able to help
B
245
S
39
G
15
Posts: 1,946
Reputation: 40,276

Post » Tue May 26, 2015 8:03 am

I run my game via NW.js, and i have put a link in the game's main menu to our website. When i run the link while ingame, it opens a browser window, which is not the default browser i use for internet (chrome) but a window... i want it to open the default user browser.
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Tue May 26, 2015 8:33 am

Dan When you create your project you might like to try DEFAULT windows in your work. Then add browser. I have tested it out when I open my work with line like below it does open.

on start of layout browser go to "http://cgpatel.co.uk" "NewWindow"

Just use default windows then Export it as NW.js. this should give you list of system to run on
B
245
S
39
G
15
Posts: 1,946
Reputation: 40,276

Post » Wed Jul 01, 2015 2:11 am

This doesn't work for me.... If I export my project using NW.js (with default browser in game settings) and use the Browser object to open a link in a new window, I just get a new NW window... @Danwood, did you find a way to get this to work by any chance?
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,193

Post » Wed Jul 01, 2015 5:03 am

@Colludium nope i didn't yet
B
63
S
22
G
4
Posts: 357
Reputation: 6,503

Post » Wed Jul 01, 2015 6:40 am

Last edited by korbaach on Wed Jul 01, 2015 8:16 am, edited 1 time in total.
Image
B
64
S
23
G
7
Posts: 1,483
Reputation: 10,827

Post » Wed Jul 01, 2015 8:03 am

@korbaach, thanks! That question got me searching Google last night and I found the answer on github. Copy the first 2 lines of code (not the comments) from nw shell github and use Browser execute JavaScript action. And viola! :)
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,193

Next

Return to How do I....?

Who is online

Users browsing this forum: digitalsoapbox, RetrocadeMedia and 1 guest