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
38
S
16
G
6
Posts: 537
Reputation: 7,582

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
49
S
23
G
17
Posts: 291
Reputation: 12,407

Post » Mon Jul 20, 2015 8:48 pm

Mm, I tried it and there's no difference. So weird.
B
38
S
16
G
6
Posts: 537
Reputation: 7,582

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
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

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
38
S
16
G
6
Posts: 537
Reputation: 7,582

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
91
S
31
G
103
Posts: 5,234
Reputation: 67,754

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
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

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
38
S
16
G
6
Posts: 537
Reputation: 7,582

Post » Thu Dec 10, 2015 9:39 pm

you could try to run .bat files
Image Image
B
22
S
13
G
130
Posts: 869
Reputation: 67,816

Next

Return to How do I....?

Who is online

Users browsing this forum: DjowG and 9 guests