Jump to content
Sign in to follow this  
bf2forlife

Moving mouse randomly?

Recommended Posts

bf2forlife

Like title says, how to move mouse randomly in: left=129, top=188, right=765, bottom=503 radius?

Share this post


Link to post
Share on other sites
bf2forlife

like this?

HotKeySet("{F5}", "_mousemove") 
HotKeySet("{F7}","_stop") 
Func _mousemove() 
While 1
$mouse=random()
MouseMove($mouse, $mouse, 10)
WEnd
EndFunc


Func _stop() 
   While 1 
      Sleep(100) 
   WEnd 
EndFunc 

While 1 
sleep(10) 
WEnd

But how i can put radius, mouse keeps moving in the top left corner of the screen.. Can any1 fix this?

Edited by bf2forlife

Share this post


Link to post
Share on other sites
flip209

$x = Random(0,@desktopwidth)

$y = Random(0,@dsktopheight)

Mousemove($x, $y)


" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites
bf2forlife

Thanks!

Edited by bf2forlife

Share this post


Link to post
Share on other sites
nonplayablecharacter

try

CODE
$x=random(xmin,xmax)

$y=random(ymin,ymax)

mousemove($x,$y)


You can always count on me for the dumb questions ;)My Scripts:Rikku

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×