ctimeless 0 Posted November 13, 2010 How can I simplify this script? i want the y cord to -10 each time it loops. also for the scroll function that im gonna add in soon, how do i make it detect so that it scrolls one single page and won't scroll too little or less? expandcollapse popupMouseMove(959, 209, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseClick("primary") Sleep (200) MouseMove(897, 300, 1) ;y coord at 300 Sleep (200) MouseClick("primary") Sleep (200) MouseMove(909, 680, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseMove(643, 446, 1) ;send ;loop again MouseMove(959, 209, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseClick("primary") Sleep (200) MouseMove(897, 290, 1) ;y coord was at 300, minus 10 = 290 Sleep (200) MouseClick("primary") Sleep (200) MouseMove(909, 680, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseMove(643, 446, 1) ;send ;loop again MouseMove(959, 209, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseClick("primary") Sleep (200) MouseMove(897, 280, 1) ;y coord was at 290, minus 10 = 280 Sleep (200) MouseClick("primary") Sleep (200) MouseMove(909, 680, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseMove(643, 446, 1) ;send ;loop again MouseMove(959, 209, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseClick("primary") Sleep (200) MouseMove(897, 270, 1) ;y coord was at 280, minus 10 = 270 Sleep (200) MouseClick("primary") Sleep (200) MouseMove(909, 680, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseMove(643, 446, 1) ;send ;loop again and again ... etc ty Share this post Link to post Share on other sites
ctimeless 0 Posted November 13, 2010 feel free to msn or email me if you could help Share this post Link to post Share on other sites
Paulie 26 Posted November 13, 2010 (edited) How can I simplify this script? i want the y cord to -10 each time it loops. also for the scroll function that im gonna add in soon, how do i make it detect so that it scrolls one single page and won't scroll too little or less? I'm not entirely sure what you want, but maybe something like this? Dim $index = 0 While $Subtract <= 300 $Subtract = $index*10 MouseClick("primary", 959, 209, 2, 1) Sleep (400) MouseClick("primary", 897, 300 - $subtract) Sleep (400) MouseClick("primary", 909, 680) Sleep (400) MouseClick("primary",643, 446) Sleep (400) $index += 1 WEnd Edited November 13, 2010 by Paulie Share this post Link to post Share on other sites
Tvern 11 Posted November 13, 2010 Your script can be simplified to: For $y = 300 To 0 Step -10 ;starts at $y = 300, then deducts 10 until 0 is reached. MouseMove(959, 209, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseClick("primary") Sleep (200) MouseMove(897, $y, 1) ;use $y here Sleep (200) MouseClick("primary") Sleep (200) MouseMove(909, 680, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseMove(643, 446, 1) ;send Next You can also remove the MouseMoves and use the coords in the MouseClicks. If you are using this to interact with an applications controls you should look into using ControlClick instead. For your other question: I can't really answer that without knowing what you are trying to scroll and how the scroll is initiated, P.s. Try not to bump your topics within 24h, but you might not have the edit option available yet. Share this post Link to post Share on other sites
ctimeless 0 Posted November 13, 2010 (edited) its used for emailing many ppl on a list Edited November 13, 2010 by ctimeless Share this post Link to post Share on other sites
Tvern 11 Posted November 13, 2010 Might be worth looking into _INetSmtpMail, _INetMail, or the Outlook UDF for that. (or BCC ) Share this post Link to post Share on other sites
ctimeless 0 Posted November 13, 2010 (edited) Your script can be simplified to: For $y = 300 To 0 Step -10 ;starts at $y = 300, then deducts 10 until 0 is reached. MouseMove(959, 209, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseClick("primary") Sleep (200) MouseMove(897, $y, 1) ;use $y here Sleep (200) MouseClick("primary") Sleep (200) MouseMove(909, 680, 1) Sleep (200) MouseClick("primary") Sleep (200) MouseMove(643, 446, 1) ;send Next You can also remove the MouseMoves and use the coords in the MouseClicks. If you are using this to interact with an applications controls you should look into using ControlClick instead. For your other question: I can't really answer that without knowing what you are trying to scroll and how the scroll is initiated, P.s. Try not to bump your topics within 24h, but you might not have the edit option available yet. so after getting to 0, it stops but how can I make it start again from the 2nd part of my script? Then vice versa and from the 2nd part of my script back to the first part, etc ie) when it gets to 0, it goes to line 99, then when it gets to line 101, it goes back to line1 Edited November 13, 2010 by ctimeless Share this post Link to post Share on other sites