This is a topic that many people are looking for. thevoltreport.com is a channel providing useful information about learning, life, digital marketing and online courses …. it will help you have an overview and solid multi-faceted knowledge . Today, thevoltreport.com would like to introduce to you AutoHotKey /Tutorial 1 (Follow up part 3) Clicks and loops introduction. Following along are instructions in the video below:
hello this is hell-bent and welcome to the third and final follow-up video for tutorial one in my autohotkey tutorial series and the last follow-up video we went over all the most move commands in this one were going to continue on and do all the click commands so go ahead and get yourself set up with your script editor and Im going to make a new file okay I guess thats already here and Im going to save it to my autohotkey tutorial folder and Im going to call this one click commands save it during the most move one I had shown you how to make a description comment at the top your page basically with your name the date that you started it the last edit and a brief description of your program so go ahead and pause the video and add that in the description you should use that this is all the most to click commands for autohotkey and once you have that go ahead and unpause it okay the first thing were going to do is were going to go down to the bottom of our page and we are going to bind some hotkeys were going to have X to exit our app below that were going to have Z to pause and then just above the first X were going to actually have it exit on its own in the one instance that its actually going to do that but its only going to be one time that it actually uses that I know but yeah you can go ahead and do that okay under your description youre going to go over a few little bit and make a comment and these comments are going to be for all of our commands that were going to be going over so the first one is going to be click well click and then in brackets were going to have basic close those brackets up go down a line and were just going to enter in a normal click command so were going to say click and then were going to do a couple of them lets go with five okay and what were going to do is in between them were going to add some sleep time or some wait time and were going to go a half second and rather than do it that way Im just actually going to copy this and paste it I should have done it this way to begin with okay so now we got five clicks and a wait time and just above that were actually going to say pause is on because we need pause to be on because if we could try to run this right now its just going to send clicks to this run script run script run script over and over and over again so were going to save our changes were going to run our script and its paused so now we need something to be able to show the clicks and you cant see my cursor so what Im going to do is Im actually going to go open up my little arrow thing that I had created and Ill bring this up so you can actually see it so Im going to go on here and Im going to activate my little arrow okay so now you can follow my cursor around okay so we have it saved and its ready to go and I have a game loaded up this is cookie clicker and if I click on this cookie you can actually see the number one rise above it out of it so this this is a good visualization of what were going to be doing okay so now if I hover over this and if I press my pause button which was set to Z it should send five clicks okay and thats it so thats our first command out of the way so were just going to comment this guy out and were going to go collapse this guy and were going to do our next one our next one were going to do is click and were going to add hotkeys this time go down a line and were going to pick on our for a hotkey go down a line and were going to just send a click and were just going to send one click but under the that line were going to say we turn so now weve got a hotkey were just going to save run our script and go back over to this game and Im just going to press R and
every time I press R it does it click OK so thats hotkeys out of the way moving along nicely so Im going to comment that out this time Im going to actually copy this because were going to be using hotkeys for everything else now so I might as well just save some time go down a few lines and write a comment saying that this is going to be click and were going to have our X&Y ok so Im going to paste in what I had before except this time in our click were going to send it to a specific location and I have a specific location in mind its going to be this cookie so in order to find this cookie what I need to do is I need to know where its x and y so if you have the script editor up at the top of the page you have this the active window tool or the window spy if not you can go to your Program Files program file did it a let me see this PC if I go in here and enter my Program Files and I am my autohotkey folder and here it is right here this this thing right here alright so anyways I got it here so Im going to go over to my game and Im just going to click on it once just to make sure that my coordinates are locked then Im going to hold the windows button and press a as note it down here to freeze the delay display then I have my relative position which is the default which were going to be using Im going to go ahead and to save time Im just going to copy that go back to our script I can close this now and Im going to paste that in so now we have an X in a while okay ssin if we go ahead and save our script and run it were going to get this and were going to fix that in a minute but for now were just going to go over here press R and if even if Im over here now its going to move my mouse over here and send a click so it did did it did all right Im going to press X to exit the script because now we need to and up here under my description if I add my description under my description Im going to say number sign and then I want to be single instance okay there it is and then a comma and force this way I dont have to hit that dialog box every time I try to run the script one is already running itll automatically do that for me so thats our hotkeys out of the way and Ill just comment that out and we can Ill make sure to copy this and we can collapse that alright the next thing I want to do is chord mode so Im going to make the comment saying click the click command that were going to be working on is chord mode and Im going to come down here and Im going to say chord mode if you remember from the first video from e I mean from the the most move we went over the chord mode and so the chord mode and then I want it to be for my mouse and then Im going to make it for the screen if you dont know what this is youre going to have to go back and watch the other video other words youre going to be lost because Im not going to be covering at all and were going to paste in our thing here save were going to run and were going to open up the game and now even if this window is open if I press my R button I didnt this is for some reason sometimes the save and relaunch doesnt work like its almost like as if it didnt get pressed okay so I got this window open Im going to press R and it should go click on the cookie okay there we go so thats with our chord mode for the screen rather than the active window which is the default and we can move on make sure I have this copied okay were going to go down a couple lines make another comment this one is going to be click and this ones going to get a little bit more complicated set set most delay and set default no speed okay this one needs
a little bit of an explanation okay this first thing here every time the most moves its considers it in action and every time it presses the button down it considers it in action and then every time it releases it back up it considers it in action so what we be doing is setting the delay in between each of those actions so lets say if I had to move my cursor from over here to over here it could take ten or so moves in order for it to get there so if I set a delay of one second it would move a little bit and then wait a second move a little bit more wait a second move a little bit wait a second and so on and so forth mostly when youre going to be using this is when it has a default of about what is it ten one thousandth of a second to either that or twenty one thousandth of a second right or in other words right the only time you that Ive ever encountered that I would want to change it if I want to send clicks really really quickly so the way you would do that is to set it to negative one which is basically theres no delay between its sending a click down click up click down click up but my computer cant actually handle that yours probably cant either but who knows umm so basically itll even if it clicks a thousand times it might only register thirty times because its just clicking that fast okay the second thing here the set default most speed is how fast its going to move across my screen and by setting this value the value of this to zero its almost like I said its teleporting so its like its here one instance and then theres no time in between its getting to here so in order for us to use this were going to need to combine those two things so were going to first set default speed okay its already filled it for me perfect okay were going to set it to zero and then were going to come down here and were going to set most delay and were going to set this to half of a second and then were going to come down here were going to paste in our or hotkey let me see do I want to add anything else to that hmm let me add a couple clicks all right so I dont need to add the coordinates for the second one because its already going to be at that location so were just going to save this and check out what it does go open our game and press R okay and you if you notice its pretty slow alright give it a try see what it does for you all right Im going to adjust this speed and were going to make this lets go down to 50 save our changes run it bring up our game and press R and that did it a lot faster all right X to exit and well try one more thing will do well set this to 1000 so this is each click is going to now take two seconds because clicking down takes a second and clicking back up takes a second so were going to go ahead and save run our script bring up our game press R alright so theres that and now well set this down to a little bit more reasonable speed why you want to highlight everything alright were going to change this down to 200 and were going to turn off this were going to set this to its default now you what youre going to notice its going to if my mouse is over here to begin with its going to go to about here and then here and then here and then here and then finally do the clicks so if I save run now if I see my cursors over here Im going to press our and youll notice it sort of do like some jumps all right Ill do it again all right so thats thats those two things out of the way and we can turn that back on all right so thats setting the the delays and the speed of the mouse bar clicks um lets see what do we got next how about multi clicks all right so were going to do our another click command and this one were going to call multi and were just going to paste in our hot
key and after the Y in this one were going to put a comma and the next number that were going to put in is how many times we actually want it to click so lets keep it a pretty low number so well well go for forty-four so its going to cook click 44 times at its default set most delay speed which is like I said its about you know ten one thousand to twenty one thousandth of a second each click so well save it well run it bring up our game press R and there we go it had a click 40 times or whatever I set it to okay so Im going to X to exit and thats multiple clicks and I can you know I can do I can do more I can change it to whatever I want run it again okay so so thats multiple clicks comment it out and minimize alright the next thing were going to do is were going to actually introduce our loops finally so click now Loops has a lot of things with it and I Im not going to get into it on this because theres just too much things to cover and I want to cover some other things before I bring in loops as a as its own subject so this is just a basic intro to loops and were just going to use a simple loop but loops can get much more complicated than what were going to be doing so Im going to go ahead and paste in our hotkey with our click and before the click what Im going to do is Im going to set it up to loop and were going to start off with 20 and then were going to come down here and were going to close it but I didnt actually open it so were going to open it alright so here we got a loop its going to go into this and whatever its in is in here its going to do that so we could have multiple lines you know we could say sleep 4 20s alright then it can itll go back up to the top again and run it again so were just going to do that save run our script and press R and its the same pretty much the same thing we had with multi except with this now what we can do is instead of doing it with 20 if we leave that blank its now infinite itll just keep going and going and going until some condition is met and that condition is us either pressing X or pause so were going to go ahead and with an infinite loop now were going to pause save were going to run our script go back over to the game press R and now itll just keep going until I press the set deposit and if I hit pause again it will go back pause pause again and then when Im finished I can just hit X and its done all right so thats our intro to loops and using a clicks inside of loops but like I said this is just an intro to it theres a lot more that you can do with this kind of thing and we will be getting into that soon enough lets go down a couple lines and our next click command what are we going to do lets get into buttons all right were going to paste in our hot key and were going to do were going to set up three hot keys all right so we got our were going to use T and were going to use Y RT and Y okay the first one is just clicking left all right now left is by default so us putting left here is the same thing as if left wasnt there at all all right the next one were going to do is were going to do right and this is going to send a right mouse-click instead and because were sending a right mouse-click we dont actually need a coordinate so well just leave it wherever it is so we got click right and then last were going to have click middle all right so thats going to click our middle button and I think we have everything set up okay so were going to save run our script bring up our game if I hit R itll go over there and click if I hit T its just going to open up that window thing here alright and if I hit Y
going to come over because this is scrollable actually I already had a scrollable thing here so if I hit Y it allows us to scroll the page alright if I come over here hit R you know T and I can repeat those over and over again so if I come here Y alright so moving on whats next lets do buttons up and down I think were getting close to the end now so theres a bunch of different commands that we can use to actually send up-and-down commands because sometimes we might want a button to be held down and then have a specific time that we want it to be released or etc etc so well go over those commands now and I think this is the last one that we need to go over so Im going to go ahead and copy these keys that we have hotkeys that we have here just to save time a little bit paste those guys in Im going to come down on another line and paste them in again and Im just going to go through them and change them so this guy Im going to change to whats my next letter you the next one is going to be an eye and Im just picking these hotkeys at random theres no real significance to them it could be any key you want all right so we got click left and were going to have this one as down and we can just leave it as a D so thats what were actually going to do were just going to say click left down and then this one here were going to actually make this were going to copy this here were going to paste it in here and were going to change this to left and the left and up alright the next one were going to change this now to right down and this one were going to change to right up this one were going to change the middle down and this one were going to change the middle up okay I think thats good yeah that looks okay alright Im going to save it run it and bring up my game alright so the first time what it should happen is if I hit R it should come over to this cookie click down but not let it let go all right so Im going to press R so okay now its holding it down if I hit T its going to go back over there and push the up so if I hit T now all right are down T up or down T up okay good now with the next two keys because we dont have a like something some applications theres going to be more things that right button does than just this because if I press Y which is the down for the right nothing happens if I hit up or you for the up it then it shows it but all I have to do is actually just hold do the up I dont actually have to do the down with it but theres probably going to be some applications where you need to have the down and the up but in this case up is all I need the next one was the the mouse wheel so were going to press I which is going to allow me to do the scroll thing and actually this page over here is that you son of a bitch why you doing that to me okay okay all right so were going to get a page that has a you know a scroll ability Im going to press I and now I can scroll up and down the page if I hit o itll release it if I hit I again it goes back to scrolling okay um one last thing and were not going to actually test it but if I take these two the mouse wheel thing and if I change this to W D and get rid of that other D and change this to W up okay so now basically what its going to do its like as if just gonna each time I click that button its going to go up up up up up or down down down down down I dont actually have to do the mouse movement to get it to do that kind of like page up page down sort of thing okay so anyways thats it for this one hope you enjoyed Ill see you in tutorial 2 if you want to come and thats it
AutoHotKey, AutoHotKey tutorial, AutoHotKey Tutorials, ahk, Ahk, AHK, Autoit, Scripts, Script writing, auto Clicker, macro, mouse macro, AHK macros
Thank you for watching all the articles on the topic AutoHotKey /Tutorial 1 (Follow up part 3) Clicks and loops introduction. All shares of thevoltreport.com are very good. We hope you are satisfied with the article. For any questions, please leave a comment below. Hopefully you guys support our website even more.