# mouse move in a curve

## Recommended Posts

hey, just kindda wondering... i know how to use mousemove(x,y,speed) could somebody develop a mousecurve(x start, y start, x end, y end, speed, amount to curve off or a straight line) my current attempt isn't really working right at all and right now i am only dividing the span up into quarters and having it move over from the straight path. heres my code but it isn't doing what i want. idealy, it would move in a nice (basically smooth) curve. i however, have no idea how to do that. also my code doesn't work right so i wouldn't reccomend basing your code off of it. heres my attempt so far.

```Func curvemouse(\$x2,\$y2,\$curve,\$speed)
\$pos = MouseGetPos()
\$x1 = \$pos[0]
\$y1 = \$pos[1]
\$x_half = \$x2 + \$x1 / 2
\$y_half = \$y2 + \$y1 / 2
\$x_q1 = \$x2 + \$x1 / 4
\$y_q1 = \$y2 + \$y1 / 4
\$x_q3 = \$x2 + \$x1 * 3 / 4
\$y_q3 = \$y2 + \$y1 * 3 / 4
MouseMove(\$x_q3 + \$curve / 2,\$y_q3,\$speed)
MouseMove(\$x_half + \$curve,\$y_half,\$speed)
MouseMove(\$x_q1 + \$curve / 2,\$y_q1,\$speed)
mousemove(\$x2,\$y2,\$speed)
EndFunc```

hope you guys can help, Kyler

##### Share on other sites

better off using the formula for an ellipse with variable focus

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

##### Share on other sites

I remember a script like this posted to the forum a while back... search for MouseMoveReal

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

Automate input type=file (Related)

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

##### Share on other sites

Remember y= ax^2 +bx +c

Graphs a parabola.

##### Share on other sites

X = -b (plus minus the square root of) b (squared) - 2ac (all devided by) 2a

LOL

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

## Create an account

Register a new account

×

• Wiki

• Back

• #### Beta

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