Storing email addresses locally in a .txt file?

Get help using Construct 2

Post » Mon Apr 11, 2016 11:22 am

Hi. So I'm preparing for PAX East, and one of the things I want to include is a sign up for a mailing list at the end of the demo. Thing is internet tends to be unstable at these events, so I wouldn't bet on using the i_frame plugin. I want to store these emails offline in a way that won't accidently get erased by localstorage clearing the save file. Any ideas on how to pull this off?

Thanks
B
35
S
10
Posts: 386
Reputation: 3,265

Post » Mon Apr 11, 2016 11:29 am

Hi Tinimations,

accidentally deleting the localstorage is like accidentally eating your keys (for me, at least :D).

Is the app opened the whole time? If yes (and also no), may use the browser object; store your mailing list into an array and make two buttons for downloading that array locally on your device as file. Before opening the app, navigate into your filesystem, search the file, open as text and copy the whole thing; after opening the app, paste the clipboard into a textbox and import into array. May be a bit unhandy, but Ild describe this as 100% failsafe.

Anyway, a localstorage should be totally enough. Since PAX doesnt go 3 weeks, I dont think that you have to worry about clearing the storage (- or you got an Crapple product and.. well... then dont use the localstorage :P).

Best regards and a nice monday,
Proxy
B
24
S
14
G
9
Posts: 118
Reputation: 6,799

Post » Mon Apr 11, 2016 12:24 pm

If you are exporting to NW.js, you can use NW.js|Write file/Append file.
B
32
S
7
G
4
Posts: 398
Reputation: 4,591

Post » Mon Apr 11, 2016 5:35 pm

@grigrizljac Thanks it worked great!
B
35
S
10
Posts: 386
Reputation: 3,265


Return to How do I....?

Who is online

Users browsing this forum: DiegoSanudoDT, R0J0hound and 10 guests