Method WinGetCaretPosY

AutoIt X

Method Reference


WinGetCaretPosY

Returns the coordinates of the caret in the foreground window

WinGetCaretPosY

Return Value

Success: Returns the Y coordinate of the caret.
Failure: Sets oAutoIt.error to 1.

Remarks

WinGetCaretPos might not return accurate values for Multiple Document Interface (MDI) applications if absolute CaretCoordMode is used. See example for a workaround. Note: Some applications report static coordinates regardless of caret position!

Related

CaretCoordMode (Option)

Example


Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
x = oAutoIt.WinGetCaretPosX()
y = oAutoIt.WinGetCaretPosY()