Cheating Network
 
 

Go Back   Cheating Network > General Computing > Programming
Reload this Page FREE AutoHotKey Help



Programming

This is a discussion about FREE AutoHotKey Help within the Programming section, where you will Anything related to programming or scripting should go here.



Reply
 
LinkBack Thread Tools Display Modes
Old 02-18-2008, 11:10 PM   #1 (permalink)
Senior Member
 
Seatbelt99's Avatar
 
Join Date: Dec 2007
Location: Grand Rapids, MI
Posts: 1,069
Reputation: 68
Seatbelt99 will become famous soon enough
Send a message via AIM to Seatbelt99 Send a message via MSN to Seatbelt99
Default FREE AutoHotKey Help

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.
Seatbelt99 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:14 PM   #2 (permalink)
Senior Member
 
noxify's Avatar
 
Join Date: Jan 2008
Posts: 458
Reputation: 31
noxify is on a distinguished road
Default

Thanks! +rep
__________________
+Rep me, I'll +Rep you back

noxify is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:21 PM   #3 (permalink)
cjk
Moderator and CN Coder
 
cjk's Avatar
 
Join Date: Dec 2007
Location: Hiding, im sneaky.... Coolness: OVER 9000
Posts: 1,118
Reputation: 89
cjk will become famous soon enough
Default

Awesome. +Rep
__________________
OVER 9000!!
cjk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:21 PM   #4 (permalink)
Global Moderator
 
itami's Avatar
 
Join Date: Dec 2007
Posts: 2,396
Reputation: 77
itami will become famous soon enough
Default

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
itami is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:29 PM   #5 (permalink)
Senior Member
 
Seatbelt99's Avatar
 
Join Date: Dec 2007
Location: Grand Rapids, MI
Posts: 1,069
Reputation: 68
Seatbelt99 will become famous soon enough
Send a message via AIM to Seatbelt99 Send a message via MSN to Seatbelt99
Default

Quote:
Originally Posted by itami View Post
So the "ControlClick" and "ControlSend" are the keys to making a silent bot?
Yes, and one more I forgot to add...
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).
__________________
Seatbelt99 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:30 PM   #6 (permalink)
Senior Member
 
Join Date: Dec 2007
Posts: 676
Reputation: 15
keyinferno ii is on a distinguished road
Default

nice... +rep
keyinferno ii is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:31 PM   #7 (permalink)
Senior Member
 
krackhead's Avatar
 
Join Date: Dec 2007
Location: heaven
Posts: 4,484
Reputation: 62
krackhead will become famous soon enough
Send a message via AIM to krackhead Send a message via MSN to krackhead
Default

very nice.
__________________
Who says you can't trust a krackhead?
Seller Feedback
Buyer/Trader Feedback
krackhead is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:33 PM   #8 (permalink)
Global Moderator
 
itami's Avatar
 
Join Date: Dec 2007
Posts: 2,396
Reputation: 77
itami will become famous soon enough
Default

Quote:
Originally Posted by Seatbelt99 View Post
Yes, and one more I forgot to add...
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).
That is VERY useful for making silent bots...

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
itami is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:40 PM   #9 (permalink)
Senior Member
 
Seatbelt99's Avatar
 
Join Date: Dec 2007
Location: Grand Rapids, MI
Posts: 1,069
Reputation: 68
Seatbelt99 will become famous soon enough
Send a message via AIM to Seatbelt99 Send a message via MSN to Seatbelt99
Default

Quote:
Originally Posted by itami View Post
That is VERY useful for making silent bots...

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?
There are many ways to do it. From the AHK help this is the info on basically any of the control commands...

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!
__________________
Seatbelt99 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:46 PM   #10 (permalink)
Global Moderator
 
itami's Avatar
 
Join Date: Dec 2007
Posts: 2,396
Reputation: 77
itami will become famous soon enough
Default

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
itami is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:48 PM   #11 (permalink)
BuM
SuperUser
 
BuM's Avatar
 
Join Date: Dec 2007
Posts: 196
Reputation: 15
BuM is on a distinguished road
Default

very cool, thanks seatbelt
BuM is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-18-2008, 11:49 PM   #12 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 1,244
Reputation: 29
casper89 is on a distinguished road
Default

Wow awesome guide!
Thanks Seatbelt!
casper89 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-19-2008, 12:13 AM   #13 (permalink)
Chemistry Wizard
 
jromper2000's Avatar
 
Join Date: Dec 2007
Location: PA
Posts: 662
Reputation: 9
jromper2000 is an unknown quantity at this point
Default

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

jromper2000 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-19-2008, 05:30 PM   #14 (permalink)
Senior Member
 
cheaterdiddy's Avatar
 
Join Date: Dec 2007
Location: microcrap
Posts: 2,431
Reputation: 47
cheaterdiddy is on a distinguished road
Send a message via AIM to cheaterdiddy
Default

oh thank you very very very very much for this seatbelt you are the greatest ever and I love you so so so much.
__________________
I need money. 69/450

Last edited by cheaterdiddy; 02-19-2008 at 05:44 PM.
cheaterdiddy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-19-2008, 05:43 PM   #15 (permalink)
Dan
CN's Best Member :P
 
Dan's Avatar
 
Join Date: Dec 2007
Location: Wasilla, Alaska
Posts: 1,332
Reputation: 54
Dan will become famous soon enough
Send a message via AIM to Dan
Default

+ rep
Dan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-19-2008, 05:56 PM   #16 (permalink)
Senior Member
 
Seatbelt99's Avatar
 
Join Date: Dec 2007
Location: Grand Rapids, MI
Posts: 1,069
Reputation: 68
Seatbelt99 will become famous soon enough
Send a message via AIM to Seatbelt99 Send a message via MSN to Seatbelt99
Default

Quote:
Originally Posted by cheater View Post
oh thank you very very very very much for this seatbelt you are the greatest ever and I love you so so so much.
Want to go make out in the Janitor's closet?
__________________
Seatbelt99 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-19-2008, 05:58 PM   #17 (permalink)
Senior Member
 
SteveJobs's Avatar
 
Join Date: Dec 2007
Location: NE
Posts: 1,661
Reputation: 53
SteveJobs will become famous soon enough
Send a message via AIM to SteveJobs Send a message via MSN to SteveJobs
Default

Ew, I think we have some homos in the house.
__________________


Quote:
Originally Posted by cheaterdiddy
steve fuck you and i knew you were only 12
LMAO. I guess people don't like me? BTW, I'm 13.
SteveJobs is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-19-2008, 06:01 PM   #18 (permalink)
Senior Member
 
Santram's Avatar
 
Join Date: Feb 2008
Posts: 720
Reputation: 23
Santram is on a distinguished road
Default

thanks +rep
Santram is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-19-2008, 06:16 PM   #19 (permalink)
Junior Member
 
Join Date: Dec 2007
Posts: 16
Reputation: 2
ehefe is an unknown quantity at this point
Default

thanks
ehefe is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-19-2008, 08:01 PM   #20 (permalink)
Senior Member
 
Seatbelt99's Avatar
 
Join Date: Dec 2007
Location: Grand Rapids, MI
Posts: 1,069
Reputation: 68
Seatbelt99 will become famous soon enough
Send a message via AIM to Seatbelt99 Send a message via MSN to Seatbelt99
Default

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