I'm so close to archieving my goal for a new feature in my game, but i need one last step!
Baiscally, my game takes a canvas snapshot (in NW.js), and automatically saves it on the computer in png.
I use a custom js to do that:
"var fs = require('fs');fs['writeFileSync']('" &replace(NodeWebkit.UserFolder & "screenshot" & ".png","\","\\")& "','" &CanvasSnapshot& "'.split(',')[1], {'encoding': 'base64'});"
I just want it to save on the user Desktop, and possibly on a custom folder created there. I know the part i need to focus on is replace(NodeWebkit.UserFolder, but i really have no clue of how to point it to the desktop, and then a custom new folder
Anyone can help? Plz