Hi, i know this topic was here several times, but all threads are very old and codes from them are not working for me.

So, I need to simulate mouse and keyboard events on my windows (moving mouse,clicking mouse, pushing keyboard buttons). I need to do this all from c++ code. This code will be running on same computer which will accept simulated signal. I wanna make something like functions - goto(int x, int y), click(short i), write(string s).

Here is thread i read recently and it didnt worked:
http://www.daniweb.com/forums/thread6727-2.html
(I read more but I cannot find them right now)

I am using MS Visual Studio C++ Express 2010.

Thanks in advance

Are you writing a console program or win32 api GUI program, or something else, suh as wxWidgets?

I am writing program that accepts information over socket and use that information to do appropriate things..

For example I wanna move mouse on my screen to position [100,200] so this program will get something like "Mouse to 100,200" and i my mouse cursor will change its position to [100,200].
Or i will click in my notepad editor, and then this program will get command(over socket) "Write Hello" and it will write 'Hello' to Notepad just like if I would do it manualy.

sorry for my english, i hope you anderstand what i want now.