# 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...

##### Share on other sites

what if you change it to MouseMove(\$x,\$y,1) or MouseMove(\$x,\$y,0)

??

Live for the present,
Dream of the future,
Learn from the past.

##### 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.

##### Share on other sites

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

```\$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

AutoIt3, the MACGYVER Pocket Knife for computers.

##### Share on other sites

It is cool to watch anyhow

Hehe !

Actually it was...

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...