Results 1 to 5 of 5

Thread: Clicking without the mouse

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    4

    Clicking without the mouse

    How do I make emulate the mouse clicking without actually using the mouse? I am looking for something similiar to the SetCursorPos function only I want to click the mouse. Both right and left click.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    You can programmatically call click events, within the form, if thats what you want?

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    4
    No, I need to click the mouse somewhere else on the screen. It looks like Mouse_Event is what I want to use but I can't seem to get it to work.

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    4
    Got it.

  5. #5
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    If you want to click on a particular window, get the get the handler to it, then use SendMessage API to send the Public Const WM_LBUTTONDOWN and WM_RBUTTONDOWN messages.
    To find the Specific window use FindWindow, FindWindowEX or GetWindow API Function.
    If you want to just click regardless of any window, use mouse_event API, see MSDN documenation of that function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width