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
65
S
22
G
4
Posts: 358
Reputation: 6,555


Post » Tue May 26, 2015 1:34 am

It's a different problem!
B
65
S
22
G
4
Posts: 358
Reputation: 6,555

Post » Tue May 26, 2015 7:53 am

Dan please explain may be able to help
B
252
S
39
G
15
Posts: 1,964
Reputation: 40,753

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
65
S
22
G
4
Posts: 358
Reputation: 6,555

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
252
S
39
G
15
Posts: 1,964
Reputation: 40,753

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?
A big fan of JavaScript.
B
74
S
20
G
71
Posts: 2,230
Reputation: 44,892

Post » Wed Jul 01, 2015 5:03 am

@Colludium nope i didn't yet
B
65
S
22
G
4
Posts: 358
Reputation: 6,555

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.
B
66
S
24
G
7
Posts: 1,515
Reputation: 11,041

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! :)
A big fan of JavaScript.
B
74
S
20
G
71
Posts: 2,230
Reputation: 44,892

Next

Return to How do I....?

Who is online

Users browsing this forum: oosyrag and 19 guests