How do I get program parameters?

0 favourites
  • 2 posts
  • When exporting with Node-Webkit is it possible to check if the program has startup parameters?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)