Thread: Making a Mouse Click

  1. #1
    Registered User
    Join Date
    Nov 2003

    Making a Mouse Click

    Hello all,

    I was wondering if it was possible to make a mouse click or move to a certain set of coordinates through a C program. I tried google but was unable to find information relating to this.

    To give an example of what I mean, lets say I wanted to write a C program with a loop and two different sets of coordinates (of the monitor screen) contained within it. Would it be possible to do this, and would it also be possible to make the program control the mouse pointer and make the it move back and forth between coord-A and coord-B.

    If this is possible, could someone please tell me what it is called (so i can try searching google again) or possibly give me some links to sites that explain how it works and how to do it? Thanks for your time.


  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Not in standard C. If you are using Windows you can use SetCursorPos(). You can also use mouse_event() or SendInput() to move the cursor or simulate a mouse click. If not Windows, post your OS. Note that moving the cursor can be considered very annoying

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-23-2006, 07:08 AM
  2. API for mouse events?
    By jsimpson in forum C Programming
    Replies: 0
    Last Post: 03-08-2006, 11:38 PM
  3. mouse click chick if they happen
    By adr in forum C++ Programming
    Replies: 3
    Last Post: 02-11-2006, 06:19 PM
  4. Making a mouse hover button, API style
    By hanhao in forum C++ Programming
    Replies: 1
    Last Post: 05-27-2004, 06:17 AM
  5. Making a mouse driver/handler..
    By Alipha in forum Windows Programming
    Replies: 3
    Last Post: 04-07-2002, 09:43 AM