0
Ich versuche, den Mauszeiger von einem Punkt zum anderen zu bewegen. Nicht in einer geraden Linie, sondern in einer Kurve. Hier ist an illustrative video. Hier ist Code, der Maus basierend auf den Standorten bewegt:Curve Mausbewegung
func smoothmove($coords,$j,$firstms);make mouse move to the note
dim $currcoord[3]
dim $diff[3]
dim $pixelsptms[3]
if $j > 1 Then
if mod($coords[$j-1][7][1],2) = 0 Then
$currcoord[1] = $coords[$j-1][1][1]
$currcoord[2] = $coords[$j-1][2][1]
Else
$currcoord[1] = $coords[$j-1][1][$coords[$j-1][1][0]]
$currcoord[2] = $coords[$j-1][2][$coords[$j-1][2][0]]
EndIf
Else
$currcoord[1] = mousegetpos(0)
$currcoord[2] = mousegetpos(1)
EndIf
if $coords[$j][1][1] = $currcoord[1] then
if $coords[$j][2][1] = $currcoord[2] then return 1
EndIf
if $coords[$j][3][1] <= $firstms then return 1
$diff[1] = $coords[$j][1][1] - $currcoord[1]
$diff[2] = $coords[$j][2][1] - $currcoord[2]
$pixelsptms[1] = ($diff[1]/($coords[$j][3][1]-$firstms)) * 12
$pixelsptms[2] = ($diff[2]/($coords[$j][3][1]-$firstms)) * 12
dim $ready[5]
$ready[1] = 2
$ready[2] = 3
$ready[3] = 2
$ready[4] = 3
$firstms += 12
$count = 0
while 1
DllCall($osumap[0], 'int', 'ReadProcessMemory', 'int', $osumap[1], 'int', $address[2], 'ptr', $bufferptr, 'int', $buffersize, 'int', '')
$ms = DllStructGetData($buffer,1)
if $ms >= $coords[$j][3][1] Then return 1
if $pixelsptms[1] < 0 Then
if $currcoord[1] <= $coords[$j][1][1] Then
$currcoord[1] = $coords[$j][1][1]
$ready[3] = 1
$pixelsptms[1] = 0
EndIf
Else
if $currcoord[1] >= $coords[$j][1][1] Then
$currcoord[1] = $coords[$j][1][1]
$ready[3] = 1
$pixelsptms[1] = 0
EndIf
EndIf
if $pixelsptms[2] < 0 then
if $currcoord[2] <= $coords[$j][2][1] Then
$currcoord[2] = $coords[$j][2][1]
$ready[4] = 1
$pixelsptms[2] = 0
EndIf
Else
if $currcoord[2] >= $coords[$j][2][1] Then
$currcoord[2] = $coords[$j][2][1]
$ready[4] = 1
$pixelsptms[2] = 0
EndIf
EndIf
if $ready[3] = $ready[4] Then return -1
if $ms >= $firstms Then
$currcoord[1] += $pixelsptms[1]
$currcoord[2] += $pixelsptms[2]
$firstms += 12
mousemove($currcoord[1],$currcoord[2],0)
EndIf
WEnd
EndFunc
'Global Const $ PI = ACos (-1)' – user4157124
Vielen Dank Herr. Ich konnte es mit deiner Hilfe funktional machen. –
@ KevinRazielexŠubr Mind [Ihre Lösung zu posten] (https://stackoverflow.com/q/47593934/4157124)? – user4157124