How to get the text cursor position in Windows?

win32gui.GetCursorPos(point)

This retrieves the cursor’s position, in screen coordinates – point = (x,y)

flags, hcursor, (x,y) = win32gui.GetCursorInfo()

Retrieves information about the global cursor.

Links:

I am assuming that you would be using python win32 API bindings or pywin32.

Leave a Comment