Maus verschieben
Verfasst: 22.06.2006 14:54
Tach!
Ich hab mal eben nen lustigen Code gemacht, der einfach nur totaler Schwachsinn ist...
Die Funktionesweise ist ganz einfach:
Der Windows-Mauscursor wird zum Spass einfach mal so durch die Gegend geschoben.
Ich hab mal eben nen lustigen Code gemacht, der einfach nur totaler Schwachsinn ist...

Die Funktionesweise ist ganz einfach:
Der Windows-Mauscursor wird zum Spass einfach mal so durch die Gegend geschoben.

Code: Alles auswählen
Structure FloatPoint
x.f
y.f
EndStructure
mouse.FloatPoint
getmouse.POINT
#Speed = 1
GetCursorPos_(@getmouse)
mouse\x = getmouse\x
mouse\y = getmouse\y
direction.f = Random(360)
ScreenW = GetSystemMetrics_(0)
ScreenH = GetSystemMetrics_(1)
Repeat
Delay(10)
direction + Random(10)-5
If mouse\x < 80
If direction < 180
direction - #Speed
Else
direction + #Speed
EndIf
EndIf
If mouse\y < 80
If direction < 270 And direction > 90
direction - #Speed
Else
direction + #Speed
EndIf
EndIf
If mouse\x > ScreenW-80
If direction < 180
direction + #Speed
Else
direction - #Speed
EndIf
EndIf
If mouse\y > ScreenH-80
If direction < 90 Or direction > 270
direction - #Speed
Else
direction + #Speed
EndIf
EndIf
If direction > 360 : direction - 360 : EndIf
If direction < 0 : direction + 360 : EndIf
mouse\x + Cos(direction*2*3.1415/360)*#Speed
mouse\y + Sin(direction*2*3.1415/360)*#Speed
SetCursorPos_(Int(mouse\x),Int(mouse\y))
Until GetAsyncKeyState_(#VK_ESCAPE)
End