Sanity Posted July 6, 2006 Share Posted July 6, 2006 Hey, What I need is a script that can left-click something a certain amount of times for how many times a press a button. Example. I wish to click something 25 times for everytime i hit a certain button. So i press (button) 5 times clicks it 125 times. Is this possible? If so please give detailed instructions on how to do this. Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 If so please give detailed instructions on how to do this. Geez thats real polite, not even a thank you, what kind a noob are you? Nay way, i'll still help My soft side HotKeySet("*YourButton*", "Click") While 1 Sleep(100) Wend Func Click() Do MouseClick("left") $i = $i+1 ToolTip($i, 0, 0) Until $i = *Your Number* EndFunc NOTE:You Have to push hotkey, then wait for clicks, not just push push push then let it click, NOTE:You have to Change *Your Button* And *Your Number* based on your hotkey, and how many clicks/push hope that helps P.S.- If you want any respect on this forum, don't make demands, ask nicley Link to comment Share on other sites More sharing options...
Sanity Posted July 6, 2006 Author Share Posted July 6, 2006 (edited) THANK YOU!!! lol i am only polite after i get wat i want XD can u plz tell me where to put this file? and for the "your number" does this mean how many clicks i want? Edited July 6, 2006 by Sanity Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 (edited) THANK YOU!!!lol i am only polite after i get wat i want XDcan u plz tell me where to put this file?No Problem, Glad to helpHowever, as to questionI don't understand..."Where to put this file?"You mean how to save it?Open notepad copy code save as "Foo.au3" then run itEDIT:Or better yetGo download SciTE4Autoit3 and use that instead of notepad, it will save you HUNDREDS of forum posts(if you actually plan on being a real Autoit User)Edit2: Your number would be how many times you want it to click per times you push the hotkey Edited July 6, 2006 by Paulie Link to comment Share on other sites More sharing options...
herewasplato Posted July 6, 2006 Share Posted July 6, 2006 ...can u plz tell me where to put this file?...I must resist... I must resist... :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 I must resist... I must resist... :-) LOL Link to comment Share on other sites More sharing options...
Sanity Posted July 6, 2006 Author Share Posted July 6, 2006 (edited) Okay I am getting what you are saying now. I can make the script run only one error now Please Help Paulie! lol thx man Edited July 6, 2006 by Sanity Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 Okay I am getting what you are saying now. I can make the script run only one error now Please Help Paulie! lol thx manI could help more if i knew what the error was Link to comment Share on other sites More sharing options...
Sanity Posted July 6, 2006 Author Share Posted July 6, 2006 My bad didnt put link in for image Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 (edited) You didn't actually need to save it a Foo.au3 lol anything.au3 would work but yeah sry change script by putting this right under the hotkeysets but above the while statement Dim $i=0 Edited July 6, 2006 by Paulie Link to comment Share on other sites More sharing options...
Sanity Posted July 6, 2006 Author Share Posted July 6, 2006 Lol Endless problems XDThis error now how do u know all this about scripts Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 (edited) Lol Endless problems XDThis error now how do u know all this about scriptsI know nothing compared to a lot of this forum, but the error is just my bad, i forgot to say that there are no asteriks in the script that was just to show you what to change :">but you'd be amazed what you can learn with a little effort and time Edited July 6, 2006 by Paulie Link to comment Share on other sites More sharing options...
Sanity Posted July 6, 2006 Author Share Posted July 6, 2006 hmmmm lol this is crazy lol it seems to keep going for more then 10 i think... wat should i do about this? like i set it to until=1 but it clicks for lots of times... Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 (edited) hmmmm lol this is crazy lol it seems to keep going for more then 10 i think... wat should i do about this? like i set it to until=1 but it clicks for lots of times...look at the tool tip at the top corner, it should only count to 10 and it only clicks once per count so it should only click 10 times Edit: You did make it Until $i = 10 Right?? Edited July 6, 2006 by Paulie Link to comment Share on other sites More sharing options...
Sanity Posted July 6, 2006 Author Share Posted July 6, 2006 (edited) wat do u mean by this is it going crazy lol btw by number do u mean in top left hand corn cause mine says 1502 lol? yes... Edited July 6, 2006 by Sanity Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 wat do u mean by this is it going crazy lolbtw by number do u mean in top left hand corn cause mine says 1502 lol?Well THATS not right ... Post the script that you are running Link to comment Share on other sites More sharing options...
herewasplato Posted July 6, 2006 Share Posted July 6, 2006 (edited) ...NOTE:You Have to push hotkey, then wait for clicks, not just push push push then let it click,...try this with the beta version of AutoIt:HotKeySet("1", "_clickIT") While 1 Sleep(99) WEnd Func _clickIT() Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & '"MouseClick(""left"", 0, 0, 25, 0)"') EndFunc ;==>_clickITEdit: add MouseGetPos() and rework the MouseClick line to "click where you are" Edited July 6, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 try this with the beta version of AutoIt:HotKeySet("1", "_clickIT") While 1 Sleep(99) WEnd Func _clickIT() Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & '"MouseClick(""left"", 0, 0, 25, 0)"') EndFunc ;==>_clickITthe only reason i didn't do it that way(Excluding the run thing), is because then it always clicks at (0,0) not wherever the mouse is Link to comment Share on other sites More sharing options...
Sanity Posted July 6, 2006 Author Share Posted July 6, 2006 Well THATS not right ... Post the script that you are runningHotKeySet("]", "Click")Dim $iWhile 1Sleep(100)WendFunc Click()DoMouseClick("left")$i = $i+1ToolTip($i, 0, 0)Until $i = 10EndFunc Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 HotKeySet("]", "Click") Dim $i While 1 Sleep(100) Wend Func Click() Do MouseClick("left") $i = $i+1 ToolTip($i, 0, 0) Until $i = 10 EndFunc OMG i'm so oblivious it keep clicking because after it counts to 10 the first time, it never reaches 10 again, therefore it keeps going till hits 10 After the Until and before EndFunc, put this If $i = 10 then $i = 0 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