imRawr Posted January 17, 2010 Share Posted January 17, 2010 Ok this is probably a nooby question but how would you make a script to spam LeftClick that toggles on and off with space. (im extremely new to autoit lol) Link to comment Share on other sites More sharing options...
Sobiech Posted January 17, 2010 Share Posted January 17, 2010 I dont understand what do you want exactly if you use "spam LeftClick" ^^ But you can use infinite loop (While) for Mouse Click While 1 MouseClick("Left", X, Y) Sleep(100) MouseClick("Left", X, Y) WEnd This script will clicking in two places each 100 miliseconds. X & Y you can get from AutoIT Window Info (tool). Welcome to AutoIT forum Have Fun & Good Luck This world is crazy Link to comment Share on other sites More sharing options...
Minikori Posted January 17, 2010 Share Posted January 17, 2010 I have a script like that of which I could modify you for two reasons: 1) You should learn your AutoIT stuff, look in the help file. 2) You used the word "spam," meaning you may be using this for malicious purposes. Good day For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
omikron48 Posted January 17, 2010 Share Posted January 17, 2010 (edited) Check the help file. Look at HotKeySet, MouseClick, While...WEnd loop, If...Then...Else conditional, Func...FuncEnd declaration. Also, maybe Sleep. Your algorithm would go like: 1 Set the hot key. 2 Declare and set the toggle variable. 3 Run the While loop. 4 Check if the toggle variable is set to active. 5 Do a mouse click if it is set to active. 6 Sleep for some milliseconds. 7 Continue with the loop. You also need to declare a function that switches the toggle variable value, which you will set to your hot key. @Minikori: "Spam", in this case, means to repeatedly do. What difference would it matter if the wording was "make it left click repeatedly"? It isn't necessarily malicious. In this case, since it will only do mouse clicks, even when it is used maliciously, it will only be annoying at most. Even then, there are some uses for stuff like that, like the Whack-A-Zombie mini game in Plants vs. Zombies. Edited January 17, 2010 by omikron48 Link to comment Share on other sites More sharing options...
imRawr Posted January 17, 2010 Author Share Posted January 17, 2010 Actually I used the word spam cause I couldn't think of a better word Link to comment Share on other sites More sharing options...
imRawr Posted January 18, 2010 Author Share Posted January 18, 2010 @omikron48 Thanks figured it out and got it running perfectly. 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