![]() |
| |||||||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Senior Member | Here are some helpful hints on how to program in AutoHotKey. These are all made specifically for bot making, which I believe is why we are all here. I will be adding to this when ever I think of something useful, or learn something new. Please feel free to post questions about anything written here, or any AHK question at all and I'll do my best to answer it. To make a bot, follow these steps: #1: Choose your target (site) #2: Design bot on paper, or in your head. This will be just basics of what you want to accomplish, and how. #3: Write "Psudo-Code" for your bot. This is just writing your bot, but not with code. WIth regular old english. For example, Psudo-Code to have a bot say Welcome to bot making 101, wait ten seconds and exit you would write... Use a message box to give greeting, then sleep for ten seconds, then exit the application. or something like that. #4: Begin writing code, testing where ever possible. #5: Finish writing bot, have a small group of people test it for you. #6: incorporate feedback and release. #7: Bask in the knowledge that you are better than everyone else. Now that you know the "timeline" of a bot, here are some useful tips for auto hot key bot making... #1: THe AHK Help file included with your auto hot key download is VERY helpful. Very well written. I have this help file up on my laptop, my desktop and my work PC virtually all the time. You should too! #2: Use all resources...Ask me questions, ask cheater or MrSpacebar or Hob questions. I am sure we would all help you. AutoHotKey.com has a great help section to ask questions in as well. Most commonly used AHK commands (for me anyway). Look them up in the AHK help file and post any questions you have here. NO question is stupid. Click - This command is used to click your mouse Send - This command is used to send keystrokes ImageSearch - THis command searches for an image on the screen PixelgetColor - This command checks which color a specific pixel is ControlClick - This command sends a click, but does not use the mouse! ControlSend - This command sends keystrokes with out activating a window! ControlSetText - This command sets the text of a control (like address bar) to whatever you want. MsgBox - This is used to display a message with an OK button. InputBox - THis is used to ask a user a question, and store the answer in a variable loop - used to do something repeatedly ***In virtually every bot!*** Learn those commands! I'll expand the list later. Helpful hint: Variables are surrounded by %. Helpful Hint: when running a .ahk script and you can't figure out what it is doing, double click on the green/red H in your system tray. It will show you what it has been doing! VERY USEFUL for troubleshooting! Helpful Hint: If you keep getting errors, check spelling of commands, and placement of commas. That is all for now as I have to do other things (like make more bots) but please please please ask questions. I would love it if everyone on CN because a bot making expert! If you have helpful hints to share, post them here and I'll add them to the list (and give you credit) Good luck, and happy botting!
__________________ Last edited by Seatbelt99; 02-18-2008 at 11:30 PM. |
| | |
| | #4 (permalink) |
| Global Moderator Join Date: Dec 2007
Posts: 2,396
Reputation: 77 ![]() | So the "ControlClick" and "ControlSend" are the keys to making a silent bot?
__________________ ![]() "As democracy is perfected, the office of President represents, more and more closely, the inner soul of the people. On some great and glorious day the plain folks of the land will reach their heart's desire at last and the White House will be adorned by a downright moron." H.L. Mencken, The Baltimore Evening Sun, July 26, 1920 |
| | |
| | #5 (permalink) | |
| Senior Member | Quote:
ControlSetText - It makes the text of a control (like the address bar) change to whatever you want. Very useful (see my MySearchFunds and BT Bots).
__________________ | |
| | |
| | #8 (permalink) | |
| Global Moderator Join Date: Dec 2007
Posts: 2,396
Reputation: 77 ![]() | Quote:
So do you have to specify which window it'll be clicking or typing in? Or does it just remember that after you minimize that window?
__________________ ![]() "As democracy is perfected, the office of President represents, more and more closely, the inner soul of the people. On some great and glorious day the plain folks of the land will reach their heart's desire at last and the White House will be adorned by a downright moron." H.L. Mencken, The Baltimore Evening Sun, July 26, 1920 | |
| | |
| | #9 (permalink) | |
| Senior Member | Quote:
ControlSetText [, Control, NewText, WinTitle, WinText, ExcludeTitle, ExcludeText] You get the Control from using the AutoIT window spy that comes with AHk. It is nice. NewText would be what you want the new text to be WinTitle ***First way to tell where to send the info***. This will be part of the title bar. WinText *I never use this* ExcludeTitle *If what you put here is in the title, it will NOT send to that window ExcludeText * I don't use this. WinTitle is the big one here - read up on it in ahk help, then ask questions!
__________________ | |
| | |
| | #10 (permalink) |
| Global Moderator Join Date: Dec 2007
Posts: 2,396
Reputation: 77 ![]() | Ah, ok. Thanks.
__________________ ![]() "As democracy is perfected, the office of President represents, more and more closely, the inner soul of the people. On some great and glorious day the plain folks of the land will reach their heart's desire at last and the White House will be adorned by a downright moron." H.L. Mencken, The Baltimore Evening Sun, July 26, 1920 |
| | |
| | #13 (permalink) |
| Chemistry Wizard Join Date: Dec 2007 Location: PA
Posts: 662
Reputation: 9 ![]() | Excellent guide. Will bookmark this for when I am making scripts
__________________ ------------------------------------------------------ If you like what I have to say. How about showin' the love ppl? Increase my rep. Sign up under me on Blingo: http://www.blingo.com/friends?ref=qlWNotsx...kTGP0ugbuCtQqyo Moola: http://www.moola.com/moopubs/b2b/exc/join....a59794e7a493d-2 Freebies4me (which is awesome): http://www.freebies4me.net/?ref=1303 ![]() |
| | |
| | #20 (permalink) |
| Senior Member | HOT KEY HELP... A hot key will be in this format. HotKey :: What you want it to do So, the following hotkey will pause or unpause the script when you hit Windows p #p: ause**The # stands for the windows key for AHK. Now what if you want to have a ho |