In my J-Text I used this code for that:
Cl = TextAreaCursor(EWin[CDoc],TextArea_Lines)
cursorpos=TextAreaCursor(EWin[CDoc],TEXTAREA_CHARS)
cursorlen=TextAreaSelLen(EWin[CDoc],TEXTAREA_CHARS)
SetStatusText Window,DocName[CDoc]+"~t~t Line: "+Int(Cl+1)+" Pos:"+Int((CursorPos-Cursorlen-TextAreaChar(EWin[CDoc],CL))+1)+" "
I guess you already know that EWin[CDoc] is the textarea var I used. You can ignore DocName[CDoc]. J-Text uses that to show the file name of the document that is displayed there.
(I must credit the BMax team. I came up with this code after diggging through the source code of the BMax IDE)
|