herewasplato Posted July 6, 2006 Share Posted July 6, 2006 (edited) ...it always clicks at (0,0) not wherever the mouse isHotKeySet("1", "_clickIT") $clicks = 25 While 1 Sleep(99) WEnd Func _clickIT() $pos = MouseGetPos() Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & _ '"MouseClick(""left"", ' & $pos[0] & _ ', ' & $pos[1] & ', ' & $clicks & ', 0)"') EndFunc ;==>_clickITrequires AutoIt beta Edit: The script shown above will: "click wherever the mouse was" when the hotkey is pressed allow you to "press (button) 5 times clicks it 125 times" per OP require AutoIt beta to run The script above will not have this limitation: "NOTE:You Have to push hotkey, then wait for clicks, not just push push push then let it click," Edited July 6, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Sanity Posted July 6, 2006 Author Share Posted July 6, 2006 is it actually clicking cause it goes so fast... is it clicking? Link to comment Share on other sites More sharing options...
herewasplato Posted July 6, 2006 Share Posted July 6, 2006 HotKeySet("]", "Click") While 1 Sleep(100) WEnd Func Click() For $i = 1 To 10 MouseClick("left") Next EndFunc ;==>Click [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
herewasplato Posted July 6, 2006 Share Posted July 6, 2006 (edited) is it actually clicking cause it goes so fast... is it clicking?Run it from within SciTE and place the mouse over a word like AutoIt3ExecuteLine and watch it select/deselect that word...Edit: oops, that was probably not directed at me. Edited July 6, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Sanity Posted July 6, 2006 Author Share Posted July 6, 2006 ok one more question say i want to click something like 10 times then later another 10... it will keep going because it is 20 clicks? so say in all i wanted to do 100 click then i would change Until $i = 10(100) If $i = 10(100) then $i = 0 *numbers in brackets are the numbers that would be changed to Link to comment Share on other sites More sharing options...
herewasplato Posted July 6, 2006 Share Posted July 6, 2006 (edited) ...*numbers in brackets are the numbers that would be changed tocan you figure out what to change in this version? HotKeySet("]", "Click") $clicks = 100 ;number of desired clicks per hotkey press $delay = 0 ;milliseconds to add between clicks While 1 Sleep(100) WEnd Func Click() For $i = 1 To $clicks MouseClick("left") ToolTip($i, 0, 0) Sleep($delay) Next ToolTip("", 0, 0) EndFunc ;==>ClickEdit: change "$speed" to "$delay" Edit2: ;milliseconds to add between cycles 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 (edited) can you figure out what to change in this version? HotKeySet("]", "Click") $clicks = 100 ;number of desired clicks per hotkey press $delay = 0 ;milliseconds to add between clicks While 1 Sleep(100) WEnd Func Click() For $i = 1 To $clicks MouseClick("left") ToolTip($i, 0, 0) Sleep($delay) Next ToolTip("", 0, 0) EndFunc ;==>ClickEdit: change "$speed" to "$delay" Lol or Opt('MouseClickDownDelay', 30) opt('MouseClickDelay', 30) Bigger number = slower click Edited July 6, 2006 by Paulie Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2006 Share Posted July 6, 2006 (edited) But... to end it all, I think this is the easiest to follow HotKeySet("]", "Click") Dim $i While 1 Sleep(100) Wend Func Click() Do MouseClick("left") $i = $i+1 ToolTip($i, 0, 0) Until $i = 10 If $i >= 10 then $i = 0 EndFunc Nice and simple I'd use this one if it works for ya Or a slower click Opt('MouseClickDelay', 20) Opt('MouseClickDownDelay', 20) HotKeySet("]", "Click") Dim $i = 0 While 1 Sleep(100) Wend Func Click() Do MouseClick("left") $i = $i+1 ToolTip($i, 0, 0) Until $i = 10 If $i >=10 then $i = 0 EndFunc 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 (edited) ...Bigger number = slower clickyes, but I was not going to explain Opt settings the OP...I guess that the OP's request:"So i press (button) 5 times clicks it 125 times."is no longer a concern.What you coded is fast enough after all :-) Edited July 6, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Sanity Posted July 7, 2006 Author Share Posted July 7, 2006 i like wat herewasplato about says i set it to 25 then i press it 5 times clicks 125 how do i make it so i dont have to reset the program if i want to click more? Link to comment Share on other sites More sharing options...
Paulie Posted July 7, 2006 Share Posted July 7, 2006 i like wat herewasplato about says i set it to 25 then i press it 5 times clicks 125 how do i make it so i dont have to reset the program if i want to click more?then look at post #17 through end Link to comment Share on other sites More sharing options...
Sanity Posted July 7, 2006 Author Share Posted July 7, 2006 actually i dont under stand how to program that i tried but i couldnt could u maybe set it up so it works in the auto-it thing u told me about... also could paulie maybe set it so it does 25 clicks everytime i press the hotkey? Thanks man plz do this almost there lol Link to comment Share on other sites More sharing options...
Paulie Posted July 7, 2006 Share Posted July 7, 2006 HotKeySet("1", "_clickIT") $clicks = 25 While 1 Sleep(99) WEnd Func _clickIT() $pos = MouseGetPos() Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & _ '"MouseClick(""left"", ' & $pos[0] & _ ', ' & $pos[1] & ', ' & $clicks & ', 0)"') EndFunc ;==>_clickIT do the same thing with this as you did in mine(it is the same as hwp's) save it as something.au3 and that will work to make it work to your liking, switch the 1 in the "hotkeyset" to whatever you want the kotkey to be, then change the $clicks = 25 to however many clicks you want per hotkey press Link to comment Share on other sites More sharing options...
Sanity Posted July 7, 2006 Author Share Posted July 7, 2006 (edited) alright i changed it now just testing it out HotKeySet("1", "_clickIT") $clicks = 25 While 1 Sleep(99) WEnd Func _clickIT() $pos = MouseGetPos() Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & _ '"MouseClick(""left"", ' & $pos[0] & _ ', ' & $pos[1] & ', ' & $clicks & ', 0)"') EndFunc ;==>_clickIT i used this script so i can press it as many times as a want and it will do 25 each time and i got an error Error: Reading the line: C:\Autoir3executeline Edited July 7, 2006 by Sanity Link to comment Share on other sites More sharing options...
Paulie Posted July 7, 2006 Share Posted July 7, 2006 C:\Autoir3executelineMake that a "t" Link to comment Share on other sites More sharing options...
Sanity Posted July 7, 2006 Author Share Posted July 7, 2006 nonono that was the error i guess i just made a typo but there is an error when i do this... that is error display thing Error: Reading the line: C:\Autoit3executeline Link to comment Share on other sites More sharing options...
Paulie Posted July 7, 2006 Share Posted July 7, 2006 nonono that was the error i guess i just made a typo but there is an error when i do this...that is error display thingError: Reading the line:C:\Autoit3executelineAre you using beta? Link to comment Share on other sites More sharing options...
Sanity Posted July 7, 2006 Author Share Posted July 7, 2006 no i dont think so im just using plain autoit3 that i downloaded? should i use beta version? Link to comment Share on other sites More sharing options...
Paulie Posted July 7, 2006 Share Posted July 7, 2006 no i dont think so im just using plain autoit3 that i downloaded?should i use beta version?that script works for me when i use the beta Link to comment Share on other sites More sharing options...
Sanity Posted July 7, 2006 Author Share Posted July 7, 2006 (edited) where can i get the beta edit: do u have a link i looked in downloads and it came up as 3 items Edited July 7, 2006 by Sanity 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