Noobcube Posted January 13, 2010 Share Posted January 13, 2010 Hi, I would like to make a scripts on a loop what will start at with a mouseclick at say the co-ords 100,100 and everytime it repeats the x and y will decrease by 10. Is that possible or will i have to type them all out? Link to comment Share on other sites More sharing options...
enaiman Posted January 13, 2010 Share Posted January 13, 2010 Of course it is possible ... and you have to type it yourself (that's how scripts are created).All you need is MouseClick, For/Next and Sleep, all of them could be found in the help file or in the online documentation http://www.autoitscript.com/autoit3/docs/It is a basic script so I guess you will enjoy making it SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
picea892 Posted January 13, 2010 Share Posted January 13, 2010 for $i=100 to 0 Step -10 ToolTip($i) sleep(100) Next Link to comment Share on other sites More sharing options...
Noobcube Posted January 13, 2010 Author Share Posted January 13, 2010 for $i=100 to 0 Step -10 ToolTip($i) sleep(100) Next Ok so far i have this sleep(5000) For $x = 441 to 1206 Step +51 For $y = 275 to 575 Step +20 Mouseclick("Left", $x, $y, 1, 5) Next MsgBox(0,"", "Ok") Next MsgBox(0,"", "Ok") but it goes 441x275 to 575, then 492x275 to 575. How come its not going 441x275, then 492x295 etc Link to comment Share on other sites More sharing options...
enaiman Posted January 13, 2010 Share Posted January 13, 2010 That's how For/Next is working: For $i = 1 To 3 For $j = 1 To 3 MsgBox(0, "$i and $j values", "$i = "&$i&", $j = "&$j, 1) Next Next SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
bogQ Posted January 13, 2010 Share Posted January 13, 2010 (edited) you can try like this Dim $x = 441,$y = 275 For $b = 0 to 15 Step 1 ToolTip($x+(51*$b)&" "&$y+(20*$b)) Sleep(100) Next Edited January 13, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
picea892 Posted January 13, 2010 Share Posted January 13, 2010 Hehe. I like BogQ's way better....but here is mine.....my posts keep getting beat today $y=275 for $x=441 to 1206 Step 51 ToolTip($x&", "&$y) $y=$y+20 sleep(100) Next Link to comment Share on other sites More sharing options...
Noobcube Posted January 13, 2010 Author Share Posted January 13, 2010 you can try like this Dim $x = 441,$y = 275 For $b = 0 to 15 Step 1 ToolTip($x+(51*$b)&" "&$y+(20*$b)) Sleep(100) Next that works thanks the 51 and 20 are wrong( my fault) but its working, thanks alot Link to comment Share on other sites More sharing options...
Noobcube Posted January 13, 2010 Author Share Posted January 13, 2010 that works thanks the 51 and 20 are wrong( my fault) but its working, thanks alot Is there a way where $b doesnt increase? Thats whats knocking my numbers out Link to comment Share on other sites More sharing options...
bogQ Posted January 13, 2010 Share Posted January 13, 2010 (edited) don't understand you, explain pls. Edited January 13, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Noobcube Posted January 13, 2010 Author Share Posted January 13, 2010 (edited) don't understand you, explain pls.The mouse has to move by 51 and 20 everytime, but its being times by b,so it will move by, 1st=0, 2nd=51, 3rd=102 etcEDIT: Nevermind, i just looked over the script and noticed what it does, DUH! Sorry for the confusion ^^ Edited January 13, 2010 by Noobcube 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