Node Webkit not running files that run in terminal

Get help using Construct 2

Post » Thu Dec 26, 2013 7:37 pm

I am having a problem in that I am trying to run python scripts from node webkit but only ones that run in a GUI (Like Notepad for instance) will run. Any help will be appreciated, so don't hesitate to post!
Sorry about the username, old account XD
B
14
S
4
Posts: 69
Reputation: 1,404

Post » Thu Dec 26, 2013 10:21 pm

When you use "Run file", the application will be launch the same way as if you doubled click on it.

"Run file
Run the file at an existing file path. This is analogous to double-clicking the file in the OS file explorer. For executable programs, it will attempt to run the program; for other file types, it will open the default associated program, such as the system default image editor if an image file is given"

I can misunderstood though, does your file do anything while being double-clicked in the explorer? (Maybe it is possible to add command lines in the path)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri Dec 27, 2013 8:18 am

@Aphrodite Well it's just a windows Batch file that will run in terminal. Maybe one of the devs would know something about it though?
Sorry about the username, old account XD
B
14
S
4
Posts: 69
Reputation: 1,404

Post » Sun Feb 16, 2014 2:05 pm

Bump. (Sorry, but I really need this!)
Sorry about the username, old account XD
B
14
S
4
Posts: 69
Reputation: 1,404

Post » Sun May 25, 2014 3:34 pm

I have ended up at this exact same problem, did you ever figure out a way to do it?
B
14
S
3
Posts: 25
Reputation: 799

Post » Mon May 26, 2014 6:55 pm

No, sorry. My only guess is that it is something to do with the C2 renderer, because if it tries to start up the file as one of it's child processes, then the C2 may not like it. I don't know, but I would be REALLY useful if one of the devs could maybe have a look at it? It's definitely a problem.
Sorry about the username, old account XD
B
14
S
4
Posts: 69
Reputation: 1,404

Post » Tue May 27, 2014 12:31 pm

Hi, I'm having the same problem when trying to run an external exe file with the node webkit "run file". It doesn't open.
And if I look to the task administrator in windows (ctrl+alt+supr), I can see the exe file running as a process, but not as an application.
The exe file I'm trying to open it's another game I made with contruct (win 32 expo with node webkit), but that I compiled togheter with a batch file into a single exe (with "advanced bat to exe" application).
B
2
Posts: 1
Reputation: 152

Post » Tue May 27, 2014 12:57 pm

couldn't you just make a shortcut with the launch params you need or write a shell script?
B
11
S
2
G
1
Posts: 202
Reputation: 1,580

Post » Tue May 27, 2014 6:46 pm

Saddly a shortcut does the same thing, What we want is to have the terminal window open with the script we have craeted in a .bat file. The issue must be in node webkit and i hope the devs take a look at it. Im trying to come up with a workaround but nothing so far :/
B
14
S
3
Posts: 25
Reputation: 799

Post » Tue May 27, 2014 10:07 pm

Create two bat files :
File1.bat
start C:\Users\%username%\Desktop\project_folder\File2.bat
rem Notice I didn't use %cd%\File2.bat because preview runs from a temp folder;

File2.bat
echo CMD STARTED

Now in your project back in construct
- add the browser plugin to your project
- create a variable named cd and set it's value to the path of your first bat file with \\ 's

To launch cmd Browser Execute Javascript :
"require('child_process').execFile('"&cd&"');"

With that said there's probably a way easier way to do this :lol:
B
11
S
2
G
1
Posts: 202
Reputation: 1,580

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Nicolas951, tarek2 and 16 guests