Write a variable to file - Forum

Forum Navigation
You need to log in to create posts and topics.

Write a variable to file

I have this code:

CreateEmptyObject [MyObjectVar]
SetVar [MyObjectVar('User')] [user]
SetVar [MyObjectVar('Date')] [NAB.DateShort]
SetVar [MyObjectVar('Time')] [NAB.Time24]
MessageBox "Benutzer Anmeldenug" "[MyObjectVar('User')] - [MyObjectVar('Date')] - [MyObjectVar('Time')]" "OK" ""

How can I write variables to file and read it later if I need it  - actually MessageBox message to file..

I read  some solutions from Forum, but, unfortunatelly , none of them work...

I try with  _FileWrite without success.

If I have to use JSON, how can I create JSON file for writing?

Or I have to use neoPHP ?

And how can I change a date format in MessageBox - MessageBos show date as mm/dd/yyyy and I need dd/mm/yyyy.

Browser date setings and Windows date settings are correct.

 

Thanks in advance :-)

@dglojnar creating local files is restricted for security reasons.

Some web browsers allows FileSystem API (Edge and Chrome):
https://webhelp.visualneo.com/neoFileSystem.html

You can use neoPhp plugin to save remote files:
https://www.youtube.com/watch?v=LbxM2KfT0YA

But if you just need to save and retrieve the content locally you can use LocalStorage:
https://webhelp.visualneo.com/LocalStorage.html
https://webhelp.visualneo.com/neoLocalStorage.html

_FileWrite will only work on neoEdge Browser and only for text strings (not JSON data) as it does in VisualNEO Win.

I hope it helps.

Regards.

@luishp

Thank You for your answer :-)

So...I don't need file locally, best option IMHO is put in on the server, so, I presume, neoPHP is answer.

 

Thank you for again help, effort and time :-)

 

Cheers!

 

P.S. Thanks for clarifying  _FileWrite command....:-)

P.P.S neoPHP option work very well :-)

luishp and Vadim have reacted to this post.
luishpVadim