Editing Node-Webkit Resources

Get help using Construct 2

Post » Mon Jul 08, 2013 3:59 pm

Yeah, you'll have to import it differently, as well as parse it, and write it to a text object.
Image ImageImage
B
164
S
49
G
139
Posts: 7,967
Reputation: 92,400

Post » Mon Jul 08, 2013 4:48 pm

Here's what I have tried so far.
On Left Button Click on Sprite
--Text->set text to NodeWebkit.UserFolder & "myfile.txt"

the result that I get is not the content of the txt file, but the title:
\Users\NOTHASEO\myfile.txt

What should I do, @newt? Thanksnothaseo2013-07-08 16:49:18
B
50
S
11
G
5
Posts: 101
Reputation: 7,147

Post » Mon Jul 08, 2013 7:45 pm

I've updated the old capx with an example.
Image ImageImage
B
164
S
49
G
139
Posts: 7,967
Reputation: 92,400

Post » Thu Jul 11, 2013 12:24 pm

Thanks @newt But now I have a new problem. When I wanted to read from specific folder I added "Folder Name" before the text, It didnt work. Could you help me?

B
50
S
11
G
5
Posts: 101
Reputation: 7,147

Post » Thu Jul 11, 2013 1:27 pm

Well you can't really know where something is on another users system, but you can use the appPath expression that comes with the nodewebkit plug.
I think you can just concatenate with and (&) and a slash with the filename.
&"\yourfilename.txt"
Image ImageImage
B
164
S
49
G
139
Posts: 7,967
Reputation: 92,400

Post » Thu Jul 11, 2013 3:19 pm

Wow, it works @newt. Many thanks for you, you just saved me
B
50
S
11
G
5
Posts: 101
Reputation: 7,147

Previous

Return to How do I....?

Who is online

Users browsing this forum: LukeW, totoe and 11 guests