Macro instruction to move cursor into a textbox?

trying this, but it doesnt work.

myTextBox = thisComponent.DrawPage.getByIndex(0)
thisComponent.getCurrentController.getViewCursor.gotoRange(myTextBox, false)

https://wiki.openoffice.org/wiki/Writer/API/View_cursor

Calc?, Writer?, Draw?, Impress?.. version of LibreOffce?.. you want write into TextBox?, you not need move the cursor.

doc = ThisComponent
dp = doc.DrawPages.getByIndex(0)
txt = dp.getByIndex(0)
txt.setString("Test ASK")

Writer, version 6.2.8. I want to move the cursor to the TextBox in order to type quickly while taking notes in class

My code works when using Frames instead of Textboxes somehow.