Ich weiß ja nicht, wie du es geschafft hast, das ding zu starten (EndFunc steht viel zu weit oben)
aber ich denke mal, du willst es so haben?
Spoiler anzeigen
[autoit]
#include <Misc.au3>
[/autoit] [autoit][/autoit] [autoit]$dll = DllOpen("user32.dll")
[/autoit] [autoit][/autoit] [autoit]HotKeySet("#c", "_Close1")
HotKeySet("#v", "TestFunc1")
While 1
Sleep(100)
WEnd
Func TestFunc1()
While 1
If _IsPressed("01", $dll) Or _IsPressed("02", $dll) Then
$pos = MouseGetPos()
$x1 = $pos[0] + Random(-6, 6, 1)
$y1 = $pos[1] + Random(-6, 6, 1)
MouseMove($x1, $y1, 10)
EndIf
WEnd
EndFunc ;==>TestFunc1
Func _Close1()
Exit
EndFunc ;==>_Close1