Thread: Macros

  1. #1
    Registered User
    Join Date
    Sep 2006


    How could I make a macro so the Enter key is pressed continuously over a period of time? This is for a dedicated game server. The games only last 15 mintues so when it goes to lobby, I want it to press enter automatically when I am AFK. I used a macro program before but I am putting it in my own program instead. Thanks

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Out of scope
    Assuming this is for Windows... look in MSDN. They have functions to simulate keypresses in <windows.h>... it's not difficult once you get the function. The hardest part is making it turn on from the game... you'd likely have to minimize and activate it if you don't want to put the extra work in.
    Sent from my iPadŽ

  3. #3
    Registered User
    Join Date
    Sep 2006
    Well, I was just going to set it to a hotkey to activate the macro function. The game would have to be maximized however. I'll check out msdn and see what I can find. thanks


    Think this might be useful, keybd_event function..hmm

    Windows NT/2000/XP:This function has been superseded. Use SendInput instead.
    Last edited by silentkarma; 09-16-2006 at 01:43 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Order of execution of preprocessor macros
    By DL1 in forum C Programming
    Replies: 2
    Last Post: 04-02-2009, 06:52 PM
  2. Pre-processor macros causing segfaults
    By nempo in forum C++ Programming
    Replies: 6
    Last Post: 02-10-2009, 02:35 AM
  3. Macros inside of macros
    By Chewie8 in forum C Programming
    Replies: 2
    Last Post: 02-24-2008, 03:51 AM
  4. Macros vs Inline Functions
    By vb.bajpai in forum C Programming
    Replies: 4
    Last Post: 08-02-2007, 11:51 AM
  5. template fn replacements for msg macros
    By Ken Fitlike in forum Windows Programming
    Replies: 17
    Last Post: 10-30-2002, 07:55 AM