beginner questions

Hello everyone
Do you know how can I read the first word of a line of a file ?

Use the example there and replace ReadAll with ReadLine.

Also see

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