Keyboard and mouse scripting

This is a discussion on Keyboard and mouse scripting within the Windows Programming forums, part of the Platform Specific Boards category; Does anyone know how to script fake keyboard and mouse input? I want to make something that automatically runs a ...

  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, 10:03 AM
  3. GLUT keyboard and mouse func separated
    By krappa in forum Game Programming
    Replies: 1
    Last Post: 04-20-2005, 07:27 PM
  4. Game Design Topic #2 - Keyboard or Mouse?
    By TechWins in forum Game Programming
    Replies: 4
    Last Post: 10-08-2002, 04:34 PM
  5. Mouse & keyboard deactivate for some seconds?
    By JoJo in forum Windows Programming
    Replies: 0
    Last Post: 09-08-2001, 01:18 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21