How do I point NW expression to desktop?

Get help using Construct 2

Post » Sun Aug 16, 2015 4:54 am

I got this js expression that saves a snapshot on my user folder:

"var fs = require('fs');fs['writeFileSync']('" &replace(NodeWebkit.UserFolder & "screenshot" & ".png","\","\\")& "','" &CanvasSnapshot& "'.split(',')[1], {'encoding': 'base64'});"

I used NodeWebkit.UserFolder for saving it on my User folder, but i need it to be on the desktop, what should i add to that?
B
65
S
22
G
4
Posts: 358
Reputation: 6,555

Post » Sun Aug 16, 2015 11:16 am

For those who want an answer see this post

https://www.scirra.com/forum/this-is-driving-me-crazy_t152226
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320


Return to How do I....?

Who is online

Users browsing this forum: Nicolas951, rayolf and 23 guests