The function behind the keybd_event and mouse_event is the SendInput function – now for some reason, in my version of VS (2005 Professional) the structures and flags are not declared – but you can pull them off MSDN quite easily. For those of you who are looking for “autoclickers” popular in MMPORGS such as Tibia, rather use this function, but it may, depending on the game, be hooked at either or both kernel and usermode.

Rather than just a snippet of code I’ve just included a thing I was messing around on Tibia for someone.

C – Source Code ( up to date version )
C – Source ( Old version, what it was before in my old post)
C# – Source ( from the old post too )


~ by Rhys Mossom on March 27, 2007.

4 Responses to “SendInput”

  1. This is rally helpful and much appreciated! Can you tell me how you would add the ability to click on a pre-defined X,Y coordinate? Thank you!

  2. SetCursorPos(x co-ord, y co-ord).

    If youre using C# however, you will need to import it first using:

    static extern bool SetCursorPos(int X, int Y);

  3. Yea, this would be good if it was there (the source) please e-mail me when you have the source and i will come back, thank’s

  4. Its right there?
    Both the C++ and C# source-files?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: