h3nno Posted August 3, 2007 Posted August 3, 2007 I am trying to make a mouse macro type thing. that makes your mouse go spastic. This is the code i have tried, there are several mistakes in it, but I'm not sure how to fix the. Dim $pos = MouseGetPos() Dim $pos2 While 1 Sleep(100) WEnd If $Pos2 = NOT $Pos Then MouseMove(10, 100) EndIf What I am trying to do is get the mouse position and set it to $pos and then if the mouse position is not $pos move the mouse to (10, 100) Thanks.
Kip Posted August 3, 2007 Posted August 3, 2007 $pos = MouseGetPos() While 1 $pos2 = MouseGetPos() If $pos[0]+$pos[1] <> $pos2[0]+$pos2[1] Then MouseMove(10,100) EndIf WEnd MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
h3nno Posted August 4, 2007 Author Posted August 4, 2007 $pos = MouseGetPos() While 1 $pos2 = MouseGetPos() If $pos[0]+$pos[1] <> $pos2[0]+$pos2[1] Then MouseMove(10,100) EndIf WEnd hey thanks that really helped!! i just have one more question $pos = MouseGetPos() HotKeySet("{End}", "Terminate") While 1 Do $pos2 = MouseGetPos() If $pos[0]+$pos[1] <> $pos2[0]+$pos2[1] Then $x = Random(0, 1000) $y = Random(0, 1000) MouseMove($x, $y) EndIf Until "Terminate" WEnd Func Terminate() Exit 0 EndFunc how would i do it randomly? how i have it now, once you move the mouse it continually jumps around the screen to random coords. and what i want is it to only move when the user moves the mouse thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now