Post Reply 
USING .TXT IN AN APP
10-03-2016, 06:02 AM
Post: #1
USING .TXT IN AN APP
Sorry for the inconvenience, Cyrille de Brebisson, but please if you would show an example of how to use an app to open files in .txt format, when I start writing to send but in txt format, what shipping out, messy
Find all posts by this user
Quote this message in a reply
10-04-2016, 05:21 AM
Post: #2
RE: USING .TXT IN AN APP
Hello,

Sorry, but I am not 100% sure that I understand your request...

If what you are trying to do is enter text in an app so that you can exchange that text with the computer, the best solution might be to use Notes, either as independent files using the Notes catalog (shift 0), or as app note (shift apps button).
Then, you can open the file on the connectivity kit and do a copy and paste to a text editor.

If you are using the PC emulator, you can directly use the edit menu copy/paste functions to copy/paste text from the currently opened note to the PC clipboard.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
10-04-2016, 12:31 PM (This post was last modified: 10-04-2016 12:38 PM by ROBERT.)
Post: #3
RE: USING .TXT IN AN APP
What I mean, that Hp prime, when programmed in the app, there is an option for example to generate images in jpg format.

Then also observe, from one app you can create files in .TXT format
specifically with the command:

AFiles("DATO.txt):="1"

If the .TXT format is generated, but you can not read well, it's like missing something
then why my dudad as use correctly

Also hize with a loop and does not work


Attached File(s) Thumbnail(s)
       
Find all posts by this user
Quote this message in a reply
10-04-2016, 03:21 PM
Post: #4
RE: USING .TXT IN AN APP
I have put on the list a request to allow saving/accessing a .txt file from an app variable as a plain text similar to how jpg/png do something a bit different.

Thanks for the suggestion!

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
10-05-2016, 06:52 AM
Post: #5
RE: USING .TXT IN AN APP
Hello,

Actually, what you are doing when you do:
AFiles("DATO.txt"):="1"
Is that you are storing a string object in a file called DATO.txt...

You can see that by doing
R->B(AFilesB("DATO.txt", 0, 10)) which will return {#FFh,#FFh,#12h,#CDh,#1h,#0h,#0h,#0h,#31h,#0h}
Here, the FFFF means nothing, the 1 is a flag, the 2 means string, CD is a pad, 1, 0, 0, 0 is the size of the string in characters and 31, 0 is the character 1 in 16 bit wchar...

If you saved something else than a string (a number for example), you would see the binary representation of that number.

If you really wanted to create a text file, you would need to do it using the AFilesB (B stands for binary) in order to save your data.
Alternatively, you could do it with a mix of AFiles and ABilesB, doing something like:
AFiles(name):= string; AFilesB(name):= AFilesB(name, 8, 10000);
which will allow you to use the AFiles function to do the string to number conversion, and then use AFilesB to 'shift' the data down and remove the string header (althrough, come to thing about it, you might need to save the data comming from AFilesB(name, 8, 10000) in a temp var, then delete the file and then write it back)...

Cyrille

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
02-06-2018, 05:33 AM
Post: #6
RE: USING .TXT IN AN APP
Lo logrué con AFiles como indican, a modo de práctica personal pude crear un lector, que permite cargar archivos aún si este pasa el límite de longitud de una cadena, puesto que lo procesa por bloques, mi objetivo era usar menos recursos que los .hpnote, lo que aún me falta es optimizarlo porque va algo lento cuando se trata de archivos grandes, aunque no creo que pueda hacerlo más de lo que ya he intentado, no estoy seguro de cuando lo continuaré, esta casi terminado.





En el video lo muestro, pero nuevamente agradezco a Erwin Ried por PrimeMon, ayuda muchísimo.

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)