Jump to content

Mouse Movement


Recommended Posts

Can anyone think of a better way to move the mouse over a specified area on the screen?

Currently I use a couple of nested For...Next loops to step through the area but it is very slow. Would like to speed up the process. Any ideas? TIA

For $y=300 to 400 Step 10

For $x=225 to 250 Step 5

MouseMove($x,$y,3)

Next

Next

Ideally what I'd like to see is the mouse starting in the middle of the area and circle outward to the edges of the area. Is that possible? Maybe I just ain't thinking hard enough...

Link to comment
Share on other sites

Yea, that would certain make the cursor move from one point to the next faster but overal was looking for a faster way rather than nested For...Next loops to move the cursor over a given area or some kinda circular algorithm/search pattern vice a stepped approach.

Link to comment
Share on other sites

I doubt faster, but if I remember my old math, this might work :whistle:

$x1=300; center or circle x
$y1=300; center or circle y
For $r=1 To 100 Step 10
     For $x=-$r To $r
     $y=int(Sqrt((($r*$r)-($x*$x))))
     tooltip($x&","&$y,$x+$x1,$y+$y1)
     Next
     For $x=$r To -$r Step -1
     $y=-int(Sqrt((($r*$r)-($x*$x))))
     tooltip($x&","&$y,$x+$x1,$y+$y1)
     Next
Next

It is cool to watch anyhow B)

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...