The IDE itself does keep track of your line number - look at the bottom right of the MaxIDE for Line and Char.
Does that help or is this something you need to do with MaxGUI (seeing as this is in the GUI thread)?
Does that help or is this something you need to do with MaxGUI (seeing as this is in the GUI thread)?