foot1221 Posted November 20, 2006 Share Posted November 20, 2006 (edited) What I'm trying to do is create a program that reads the distance from one point to another, then divides the distance by 3. Then clicks on a point, drags to a certain point and then lets go. This would be easy if this had worked: Local $b = ($m * $throwX) - $throwY Local $x = int($x = Sqrt($d^2 - ($m * ($x + $d)) + $b)) Local $y = $m * $x + $b MouseMove($throwX, $throwY) MouseDown("left") Sleep(50) MouseMove($x, $y, 4) MouseUp("left") Sleep(100) The problem is $x is being used to define itself, which can't be done apparently. In above, $b is the y-intercept, $x is the x cord of where the mouse is being dragged to, and $y is the y of where the mouse is being dragged to, $throwX and $throwY is the point where dragging starts. In short, I'm asking for something that can solver for X in the 2nd line, does such a function exist in AutoIt? Edited November 20, 2006 by foot1221 Link to comment Share on other sites More sharing options...
nitekram Posted November 20, 2006 Share Posted November 20, 2006 What I'm trying to do is create a program that reads the distance from one point to another, then divides the distance by 3. Then clicks on a point, drags to a certain point and then lets go. This would be easy if this had worked: Local $b = ($m * $throwX) - $throwY Local $x = int($x = Sqrt($d^2 - ($m * ($x + $d)) + $b)) Local $y = $m * $x + $b MouseMove($throwX, $throwY) MouseDown("left") Sleep(50) MouseMove($x, $y, 4) MouseUp("left") Sleep(100) The problem is $x is being used to define itself, which can't be done apparently. In above, $b is the y-intercept, $x is the x cord of where the mouse is being dragged to, and $y is the y of where the mouse is being dragged to, $throwX and $throwY is the point where dragging starts. In short, I'm asking for something that can solver for X in the 2nd line, does such a function exist in AutoIt?Can you use this and then divide by 3 http://www.autoitscript.com/forum/index.ph...c=35311&hl= 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
Developers Jos Posted November 20, 2006 Developers Share Posted November 20, 2006 This doesn't look right : Local $x = int($x = Sqrt($d^2 - ($m * ($x + $d)) + $b)) Maybe : Local $x = int(Sqrt($d^2 - ($m * ($x + $d)) + $b)) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now