This code works (apparently?) very well and prints the x cursor position .
Code: Select all
CursorPositionX()
{
clipboard =
Sendinput +{Home}^c^v
return StrLen(clipboard)
}
^w::
tmp := clipboard
msgbox % CursorPositionX()
clipboard := tmp
Code: Select all
CursorPositionX()
{
clipboard =
Sendinput +{Home}^c ; differences are here
ClipWait 0.1 ; here
Sendinput ^v ; and here
return StrLen(clipboard)
}
^w::
tmp := clipboard
msgbox % CursorPositionX()
clipboard := tmp