Thread: Building Bots

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    12

    Building Bots

    I think that I worded my previous post incorrectly. What I meant to ask was, how are bots made in c++? For instance, how does a bot for a pc game move your character/player/whatever without you actually doing it--you could be taking a shower and you can have a bot running to control the character in the game. Does the bot( program from now on) give the hardware commands that the game responds to OR does the program give the game commands directly?

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Generally, programs intercept messages from the hardware, and respond to it. Other programs can send messages to other programs, and can just simply send the hardware program's message. It's done in Windows quite often.

  3. #3
    Registered User Kybo_Ren's Avatar
    Join Date
    Sep 2004
    Posts
    136
    These are typically accomplished under Windows through keybd_event(), mouse_event(), SendInput(), or SendMessage().

    EDIT: The first three insert data into the keyboard and/or mouse input stream, while SendMessage() will allow you to send a mouse or keyboard event directly to the application.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 06-08-2009, 05:33 PM
  2. GUI building, is RAD the way to go?
    By indigo0086 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-21-2007, 09:36 PM
  3. Warning when building!
    By electrolove in forum C Programming
    Replies: 21
    Last Post: 02-12-2003, 09:39 PM
  4. AIM and MSN Bots in C++
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 05-19-2002, 02:18 PM
  5. Bots
    By Korn1699 in forum C++ Programming
    Replies: 6
    Last Post: 02-27-2002, 12:52 PM