How to put a .txt file content into a field

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
trags3
Posts: 434
Joined: Wed Apr 09, 2014 1:58 am

How to put a .txt file content into a field

Post by trags3 » Fri Feb 20, 2026 3:07 am

Hi All,
I have been wrestling with this for a while now and I have been away from LC for some time now. Trying to get back to it!
In an App I aim developing, when I open a particular card I want to populate a field with the contents of a .txt file.
Each line of the .txt file contains 4 tab separated items. Both the App and the .txt file are in the same file folder on my MacBook Air.
The File is named Product.txt and each line has the name of a product and 3 other data items.
When I open one particular card in the App I want to populate a field on the card with the contents of the Product.txt file. The file will normally contain no more than 150 lines. The field I want to contain this data (tingredient) has a vertical scroll bar.

What I want to do is when the card is opened, I want to open the Product.txt file and put the content of the file into the field named tingredient.

I appreciate any help with this I can get.

Tom


Post Reply