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
178
S
50
G
205
Posts: 8,684
Reputation: 127,211

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
65
S
15
G
6
Posts: 103
Reputation: 8,431

Post » Mon Jul 08, 2013 7:45 pm

I've updated the old capx with an example.
Image ImageImage
B
178
S
50
G
205
Posts: 8,684
Reputation: 127,211

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
65
S
15
G
6
Posts: 103
Reputation: 8,431

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
178
S
50
G
205
Posts: 8,684
Reputation: 127,211

Post » Thu Jul 11, 2013 3:19 pm

Wow, it works @newt. Many thanks for you, you just saved me
B
65
S
15
G
6
Posts: 103
Reputation: 8,431

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests