Make mouse click

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lumpybanana247
    New Member
    • Apr 2007
    • 134

    Make mouse click

    is there a way to make the mouse "click"

    the reason is i want to make an app that will automatically click on something

    thanks
  • ilikepython
    Recognized Expert Contributor
    • Feb 2007
    • 844

    #2
    Originally posted by lumpybanana247
    is there a way to make the mouse "click"

    the reason is i want to make an app that will automatically click on something

    thanks
    You're using the Windows API right? Try this function.

    Comment

    • lumpybanana247
      New Member
      • Apr 2007
      • 134

      #3
      Originally posted by ilikepython
      You're using the Windows API right? Try this function.
      thanks for the reply, but "LPINPUT" was undeclared.

      i included "Winuser.h and "Windows.h"
      i also put User32.lib in the library directorys.

      thanks again

      Comment

      • ilikepython
        Recognized Expert Contributor
        • Feb 2007
        • 844

        #4
        Originally posted by lumpybanana247
        thanks for the reply, but "LPINPUT" was undeclared.

        i included "Winuser.h and "Windows.h"
        i also put User32.lib in the library directorys.

        thanks again
        Hmm, I'm not sure what's the problem so could you please post the code that you used.
        Last edited by ilikepython; Jun 12 '07, 01:56 AM. Reason: sentece didn't make sense

        Comment

        • lumpybanana247
          New Member
          • Apr 2007
          • 134

          #5
          the only thing i did was added "
          UINT SendInput(
          UINT nInputs,
          LPINPUT pInputs,
          int cbSize
          );
          "
          into my script (with nothing much in it) just to see if it worked

          Comment

          • ilikepython
            Recognized Expert Contributor
            • Feb 2007
            • 844

            #6
            Originally posted by lumpybanana247
            the only thing i did was added "
            UINT SendInput(
            UINT nInputs,
            LPINPUT pInputs,
            int cbSize
            );
            "
            into my script (with nothing much in it) just to see if it worked
            nInputs, pInputs, and cbSize are parameters. You need to pass them to the function. Did you declare them?

            Comment

            • lumpybanana247
              New Member
              • Apr 2007
              • 134

              #7
              Originally posted by ilikepython
              nInputs, pInputs, and cbSize are parameters. You need to pass them to the function. Did you declare them?
              o- i see, thanks a lot

              Comment

              Working...