# Displaying text from txt file

**URL:** <https://forum.kirupa.com/t/displaying-text-from-txt-file/2892>\
**Category:** Uncategorized\
**Created:** [March 16, 2002, 8:16pm UTC](https://forum.kirupa.com/t/displaying-text-from-txt-file/2892 "2002-03-16T20:16:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 16, 2002, 8:16pm UTC](https://forum.kirupa.com/t/displaying-text-from-txt-file/2892/1 "2002-03-16T20:16:36Z")

</div>

how can i display specific line of .txt file in a text field??

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 16, 2002, 9:57pm UTC](https://forum.kirupa.com/t/displaying-text-from-txt-file/2892/2 "2002-03-16T21:57:09Z")

</div>

scroll to it…\rif you know the number of lines in the text file it shouldn’t be hard to figure out.\r:) \rjeremy

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 16, 2002, 10:38pm UTC](https://forum.kirupa.com/t/displaying-text-from-txt-file/2892/3 "2002-03-16T22:38:07Z")

</div>

hmmm… i have a text file with a lot of text… and I need to put let we say line 129 in textfield1 and line 210 in textfield2… how do i do that?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 16, 2002, 10:41pm UTC](https://forum.kirupa.com/t/displaying-text-from-txt-file/2892/4 "2002-03-16T22:41:09Z")

</div>

If you don’t need the rest of your file, just put those two lines in a variable each and load only these!?\rElse, there’s string.methods to extract parts of a string…a bit long to explain in a simple post…(string.firstIndexOf; charAt …)
