Page 2 of 2

Re: How to open a file?

Posted: Thu Oct 21, 2021 6:21 pm
by Klaus
If you have a field in your LC app that you have modified and want to write it to a file on the mobile platform:

Code: Select all

...
## This folder-> specialfolderpath("documents") is the only folder where we have write permission on the mobile platform!
## 1. Define a filename:
put specialfolderpath("documents") & "/name_for_your_text_file_her.txt" into tFileName

## 2. Now put the content of your field into that file:
put fld "Name of your field here" into url("file:" & tFileName)
...
If that is not what you want please be much more specific!

Re: How to open a file?

Posted: Thu Oct 21, 2021 6:26 pm
by richmond62
So what is the code I need to write?
code for what?
-
SShot 2021-10-21 at 20.24.49.png
-
I suppose in your language you do have manners.

It would be good if you learnt a few in English.

Re: How to open a file?

Posted: Thu Oct 21, 2021 6:30 pm
by dunbarx
Hi.

I am with Klaus here, in that if at all possible, simply place your text into a field. You then have direct access to that field, and do not need to leave the stack at all. Fields can hold any amount of text, can be of any size and format, and you can place that field anywhere you want, even on another stack that is built only to hold the field itself.

Craig