tokenat(string,index,newline) works like a charm.
Also I didn't manage to successfully import stuff by previewing
So for testing I do a
[code]on start of layout
-> set [variable you want to import your .txt to] to [and I past the big .txt][/code]
You just have to remember that if you use external files, you will have a little lag between the ajax call and the answer.
You usually have to stop thing while waiting for the answer. As I launched the writting once I was sure I had received something in my example capx.