Hello,
What do i want to do?
I wanna manipulate the input device in general. That means i don't want to klick a button in a special program or window. I want to move my mouse and klick where it is and press the keyboard.
Why do i want this?
there is an older game where i wanna record some things for a game mod trailer. The game supports a free cam mod, but it's very difficult to get a smooth camera movement. So i wanna program the camera path, start the game and run the program for the camera movement.
i know with this request it would be possible to cheat in multiplayer games, but i promise i won't. i hate these cheaters.
What is my problem?
i found some code that i understand a bit:
<
SetCursorPos(5, 1075);
Sleep(1000);
INPUT MausKlick;
MausKlick.type = INPUT_MOUSE;
MausKlick.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
SendInput(1, &MausKlick, sizeof(MausKlick));
MausKlick.mi.dwFlags = MOUSEEVENTF_LEFTUP;
SendInput(1, &MausKlick, sizeof(MausKlick));>
everything works fine. the mouse jumps to start and klicks. But next the screen become black. So why does this happen??
Alternative i found this
https://msdn.microsoft.com/de-de/library/ms171548(v=vs.110).aspx
But i don't understand how the MouseEventArgs works.
Someone can point me out how to trigger mouse klicks??