How do I get program parameters?

Get help using Construct 2

Post » Wed Feb 11, 2015 8:19 pm

When exporting with Node-Webkit is it possible to check if the program has startup parameters?
Nothing goes unanswered!
B
22
S
5
G
1
Posts: 430
Reputation: 3,388

Post » Sun Feb 15, 2015 3:29 pm

I've looked into nodewebkit and there is supposedly a --url parameter. I can specify this by running the nw.exe with the argument but not an exported game. I was thinking that if this were possible I could use it to add startup parameters using the browser's get function.

NOTE: I have just tested and I can run my game through the nw.exe instead of my game's exe with the --url set to "file:///C:/Users/Gregory/AppData/Local/Temp/nw5848_5102/index.html?param=true". This allows for the game to have a startup parameter set.

Is there an easier way around this or am I stuck using this method?

Also, is there a way of using nw so that it looks for all of the files in the same directory as the exe, or just any other directory besides a temp one?

EDIT: I found that by opening package.nw and editing the 'main' value of package.json I could create a startup parameter, but not one that is editable on startup.. so not much use :(
Nothing goes unanswered!
B
22
S
5
G
1
Posts: 430
Reputation: 3,388


Return to How do I....?

Who is online

Users browsing this forum: Alex Bryant, Congrats2u, kiko2015, Moordhuis, omnipaws, R0J0hound, tarek2 and 11 guests