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
66
S
22
G
4
Posts: 360
Reputation: 6,584

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
25
S
14
G
139
Posts: 876
Reputation: 72,510


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests