How to use macros to control the display cursor within a cell and retrieve the selected text from the cursor within the cell

How to use macros to control the display cursor within a cell and retrieve the selected text from the cursor within the cell

Here’s an example (2009) of a listener for Draw by @ms777.

Thank you, I’ll give it a try

There is no service for a “display cursor” (ViewCursor?) in Calc, but you can get the visually selected part of a cell text under editing with a trick. See attached example.
Of course, you can’t “control” something that doesn’t exist, but you can use a (invisisble) TextCursor for a cell, and move it around, and change its range. See attached example.
disask119970_TextCursorInCalcCells.ods (16.9 KB)

Thank you, I’ll give it a try