Bei meinem Skript ist was falsch, aber was. Es misst die zurückgelegte Strecker der Maus in Metern. Aber eben nur die x- und nicht die y-Abweichung, was geht nicht?
Spoiler anzeigen
[autoit]
HotKeySet("{ESC}", "terminate")
$run = 0
$pxconst = 0.026458333
While 1
$pos = MouseGetPos()
Sleep(1)
$tx = MouseGetPos(0)
$ty = MouseGetPos(1)
If $tx < $pos[0] Then
$run = $run + $pos[0] - $tx
EndIf
If $tx > $pos[0] Then
$run = $run + $tx - $pos[0]
EndIf
If $ty < $pos[1] Then
$run = $run + $pos[1] - $ty
EndIf
If $ty < $pos[1] Then
$run = $run + $ty - $pos[1]
EndIf
ToolTip("Meter: "&Round($run*$pxconst/100, 2))
WEnd
Func terminate()
Exit
EndFunc