Jump to content

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

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

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

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

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

Link to comment
Share on other sites

Brings to mind quadratic functions

:whistle: Remember y= ax^2 +bx +c

Graphs a parabola.

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

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