Files

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AgentItay
Posts: 60
Joined: Mon Aug 24, 2015 8:54 pm

Files

Post by AgentItay » Mon Mar 14, 2016 12:18 pm

Hey, how do I look for an empty line in a file, and how do I loop the lines of the file?
Thanks in advance :).

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Files

Post by Klaus » Mon Mar 14, 2016 1:43 pm

Shalom Itay,

read the file(s) into a variable and do what must be done:
...
## Simple text file:
put url("file" & "path/to/file.txt") into tTextVariable
repeat for each line tLine in tTextVariable
## Do something with tLine...
...
## Binary file:
put url("binfile" & "path/to/binaryfile.bin") into tBinaryVariable
## No idea how to parse binary stuff, sorry...
...

Best

Klaus

AgentItay
Posts: 60
Joined: Mon Aug 24, 2015 8:54 pm

Re: Files

Post by AgentItay » Tue Mar 15, 2016 11:12 am

Thank you.

Post Reply