Do you know how can I read the first word of a line of a file ?
Use the example there and replace
And here are some User Guide topics that might help:
And there is an example included with Xojo that you might like to pull apart and learn from. Check out the XojoText example in Example Projects/Sample Applications/XojoText.xojo_binary_project