How do I use nw.js 'Run file' command right?

Get help using Construct 2

Post » Mon Jul 20, 2015 2:04 pm

I've tried doing it like this:

Code: Select all
On start of layout            |  System            |Set OrgScreenWidth to Browser.ScreenWidth
                                 System           | Set OrgScreenHeight to Browser.ScreenHeight
                                 NodeWebkit       | run "qres_launcher.exe"

... and nothing gets run. Am I misunderstanding something here?
B
40
S
16
G
6
Posts: 543
Reputation: 7,649

Post » Mon Jul 20, 2015 7:30 pm

Been a while since I've used it, but doesn't NW.js require the full file path to the file?
B
54
S
24
G
18
Posts: 295
Reputation: 13,140

Post » Mon Jul 20, 2015 8:48 pm

Mm, I tried it and there's no difference. So weird.
B
40
S
16
G
6
Posts: 543
Reputation: 7,649

Post » Mon Jul 20, 2015 9:45 pm

Maybe try including the Apllication path prefix i.e. NWjs.AppFolder & "filename.exe"'.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,556
Reputation: 60,456

Post » Wed Jul 22, 2015 4:14 pm

Didn't help either unfortunately :/ Ah well, I'll just let it be for now I think.
B
40
S
16
G
6
Posts: 543
Reputation: 7,649

Post » Wed Jul 22, 2015 6:26 pm

Testing it in windows 7 it seems you can't run the exe if it's in certain locations.
If I run:
"c:\windows\notepad.exe"
It works, but if I copy notepad to "c:\tmp" and try to run that:
"c:\tmp\notepad.exe"
It doesn't work.

I'm guessing it may be some security block, but i'm not sure.
B
94
S
33
G
118
Posts: 5,395
Reputation: 75,851

Post » Thu Dec 10, 2015 12:29 pm

Doesn't work from NWjs.UserFolder, either. This is most bothersome.

Most bothersome indeed.
B
4
Posts: 14
Reputation: 230

Post » Thu Dec 10, 2015 1:13 pm

@KodeMonkee
KodeMonkee wrote:Doesn't work from NWjs.UserFolder, either. This is most bothersome.

Most bothersome indeed.


I just tested using latest r218 and NWjs alpha7 and it worked for me.

Set a variable(fpath) to an mp4 file off Userfolder, then called runfile:

Code: Select all
On Button Clicked - NWjs Run NWjs.UserFolder&fpath


It accessed the mp4 and ran it's associated launch program (Vlc).

Is this the type of thing you were attempting?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,556
Reputation: 60,456

Post » Thu Dec 10, 2015 8:29 pm

It works for me now after swapping the NodeWebkit object for nwjs. Curious where the nwJS.UserFolder is at exactly tho. nwJS preview apparently uses its own location too.
B
40
S
16
G
6
Posts: 543
Reputation: 7,649

Post » Thu Dec 10, 2015 9:39 pm

you could try to run .bat files
Image Image
B
26
S
15
G
143
Posts: 882
Reputation: 74,562

Next

Return to How do I....?

Who is online

Users browsing this forum: Ryan Kocourek and 23 guests