"Changing mode" means changing selection, I guess.
So - you need to assign different object(s) to app.selection:
1. app.selection = someTextFrame.insertionPoints[mIP];
where mIP is an index of insertionPoint where you need to place a cursor
2. app.selection = someTextFrame;
Read someTextFrame.geometricBounds to find out its coordinates .
1. app.toolBoxTools.currentTool = UITools.SELECTION_TOOL;
2. f.geometricBounds (where f is your text frame).
do you want to select the text frame(s) of a selected insertion point or text?
Or do you want to read out the geometric bounds (or some coordinates) of the text frame(s) where some text is selected?
Reading out the geometric bounds:
The selection itself would stay as it is. A text selection.
No need to select the text frame(s) of the selected text, if you want to find out the geometric bounds.