[SOLVED]How do I open multiple instances of nwjs?

0 favourites
  • 2 posts
From the Asset Store
Be quick and choose the right answer for the shown equation.
  • Hi, I would like to know how to open multiple instances of nwjs when the game is exported, just for testing purposes.

    I already tried to modify the .nw package by adding single-instance : false in package.json.

    Then I tried to add a single-instance json script which is executed in the index.html but without result do you have any leads ?

    Thanks :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem solved.

    1.Rename the file package.nw to package.zip

    2.Extract the file, open the file index.html with a text editor.

    3.Between the

    	<head> </head> 

    . Add :

    You have to add a < before the script> in the first line

    			nw.App.on("open", function(args)

    4.Select all the files, create a zip and not a rar. and rename it to package.nw

    The first start of the program gives you 1 window.

    The second start of the program gives you 2 windows.

    Starting the program for the third time gives you 4 windows.

    Running the program for the fourth time gives you 8 windows.

    I'm sorry to have posted this quickly I found my answers 2 minutes after the post I hope it will be useful.

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