Tomohashi Posted May 22, 2007 Share Posted May 22, 2007 Hey. I'm not very experienced with AutoIt, but I've made some things all by myself, so I thought something that would make the mouse click repeatedly would be easy. I was wrong. I tried... Send("{MouseClick}"), but it didn't work. Any help? Link to comment Share on other sites More sharing options...
PaulIA Posted May 22, 2007 Share Posted May 22, 2007 Hey.I'm not very experienced with AutoIt, but I've made some things all by myself, so I thought something that would make the mouse click repeatedly would be easy.I was wrong. I tried...Send("{MouseClick}"), but it didn't work.Any help?The only thing that I can say that wouldn't sound sarcastic: MouseClick Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Achilles Posted May 22, 2007 Share Posted May 22, 2007 (edited) HotKeySet('{Esc}', '_Exit') Sleep(3000) ;Give the user time to position the mouse While 1 MouseClick('left') Sleep(1000) ;click every second Wend Func _Exit() Exit EndFuncSearch MouseClick in the helpfile for more info.. Edited May 22, 2007 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
herewasplato Posted May 22, 2007 Share Posted May 22, 2007 Sleep(3000);Give the user time to position the mouse where they want it to click repeatedly While 1 MouseClick("left") WendSearch MouseClick in the helpfile for more info.....and how would you stop this script? :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Achilles Posted May 22, 2007 Share Posted May 22, 2007 (edited) ...and how would you stop this script? :-)That doesn't matter! Ummm, well maybe it does. I'll change that to include a exit hotkey, and to include a sleep... Edited May 22, 2007 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
herewasplato Posted May 22, 2007 Share Posted May 22, 2007 That doesn't matter! Ummm, well maybe it does. I'll change that to include a exit hotkey, and to include a sleep...It just made me smile - hence the :-)I could just see the OP testing that code.I've written code that I cannot get out of so often that I have a Kill AutoIt script that I start via an OS shortcut key. :-(-MSP- [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Davo Posted May 22, 2007 Share Posted May 22, 2007 I've written code that I cannot get out of so often that I have a Kill AutoIt script that I start via an OS shortcut key. :-(lol. That has happened to me a few times but I had a combination of MouseClick and Send and it was meant to open a window and type in it, instead it couldn't open the window and started mouseclicking and sending to my source code then the final send key was Send("^s"). I think you get the picture Davo ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!! Link to comment Share on other sites More sharing options...
Generator Posted May 22, 2007 Share Posted May 22, 2007 Made this for myself while ago: #NoTrayIcon HotKeySet("{F11}","AutoClicker") HotKeySet("{NUMPADADD}","SleepMinus") HotKeySet("{NUMPADSUB}","SleepPlus") Global $ACBoolean=False, $Sleep=500 While 1 Sleep(1000) WEnd Func AutoClicker() $ACBoolean=Not $ACBoolean While $ACBoolean=True MouseClick("left") Sleep($Sleep) WEnd EndFunc Func SleepPlus() $Sleep=$Sleep+50 If $Sleep>=1000 Then $Sleep=1000 EndIf EndFunc Func SleepMinus() $Sleep=$Sleep-50 If $Sleep<=10 Then $Sleep=10 EndIf EndFunc Link to comment Share on other sites More sharing options...
Achilles Posted May 23, 2007 Share Posted May 23, 2007 Made this for myself while ago: #NoTrayIcon HotKeySet("{F11}","AutoClicker") HotKeySet("{NUMPADADD}","SleepMinus") HotKeySet("{NUMPADSUB}","SleepPlus") Global $ACBoolean=False, $Sleep=500 While 1 Sleep(1000) WEnd Func AutoClicker() $ACBoolean=Not $ACBoolean While $ACBoolean=True MouseClick("left") Sleep($Sleep) WEnd EndFunc Func SleepPlus() $Sleep=$Sleep+50 If $Sleep>=1000 Then $Sleep=1000 EndIf EndFunc Func SleepMinus() $Sleep=$Sleep-50 If $Sleep<=10 Then $Sleep=10 EndIf EndFuncJust a small question... why do you limit the sleep to one second? My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Generator Posted May 23, 2007 Share Posted May 23, 2007 Well you can adjust it yourself, because sometimes i want to refresh web page and 1 sec per click is a good rate. It will be hard to adjust after if you set the limit to too big which you don't know how many sec between per click. 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