LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
put fld "TemplatePath" into sFile
open file sFile for read
read from file sFile at 1 until EOF
put it into fld "fldContent"
put the first line of fld "fldContent" into wTitle
How do I now get the rest of the file into another variable? I thought it might be as simple as:
...
put fld "TemplatePath" into sFile
put URL("file:" & sFile) into fld "fldContent"
## Use "file:" for text files and "binfile:" for binary data
put the line 1 of fld "fldContent" into wTitle
put line 2 to -1 of fld "fldContent" into "fldRest"
# Yes you can start counting from the end of fields/text :-)
# line -1 = last line
# line -2 = last but one line etc...