Thread: Keyboard and mouse scripting

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    3

    Keyboard and mouse scripting

    Does anyone know how to script fake keyboard and mouse input? I want to make something that automatically runs a program and then pretends to press keys in the program, specifically, Alt-F, I, Enter, Enter.

  2. #2
    Registered User johnnie2's Avatar
    Join Date
    Aug 2001
    Posts
    186
    Look into the WM_KEYDOWN window message and the mouse_event() function.
    "Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    3
    Thanks, it turns out that the function SendInput has replaced mouse_event and it does mouse, keyboard, and hardware scripting.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Detecting keyboard and mouse in linux
    By sameer.nalwade in forum C Programming
    Replies: 3
    Last Post: 11-22-2008, 04:24 AM
  2. how to handle keyboard and mouse events for all windows
    By manav-II in forum Windows Programming
    Replies: 3
    Last Post: 08-25-2008, 09:03 AM
  3. GLUT keyboard and mouse func separated
    By krappa in forum Game Programming
    Replies: 1
    Last Post: 04-20-2005, 06:27 PM
  4. Game Design Topic #2 - Keyboard or Mouse?
    By TechWins in forum Game Programming
    Replies: 4
    Last Post: 10-08-2002, 03:34 PM
  5. Mouse & keyboard deactivate for some seconds?
    By JoJo in forum Windows Programming
    Replies: 0
    Last Post: 09-08-2001, 12:18 PM