Sendmessage/Postmessage

Posts 15 of 5 · Page 1 of 1
Sendmessage/Postmessage
well, i managed to get these 2 to work...

the problem comes just with the window...

Notepad ex: I tried to get it to send it messages without being focused (thats the point of it...) and managed to do it with:


Code:
windowHandle = FindWindow(null, windowName);
windowHandle = FindWindowEx(windowHandle, IntPtr.Zero, "Edit", "");
(It's in C# because i was writting C# at that time, but it's not hard to understand or rewrite in c++) <.<

Well, i understood that i had to get the "class?" inside the window ("edit") where i could write at (without it, it would write on Window Title it self)... the problem is.. it is not multi functional.. Microsoft Word won't use it for example.. Most of the other windows/processes won't use it either...
Some just need the normal Handle from FindWindow, others something else.

I'm trying to find a way to make it multi-functional for different processes / windows... And i can't find a way for it.. if it's even possible.. Any ideas?

EDIT: The point is to send text/keystrokes/press's to a non focused window..
I guess it's kinda impossible. From my "research", Sendmessage/Postmessage are not really a good API because of stuff like this. Will have to choose a different option.. Or multi Options. I can always force somestuff..

You can now close HD
Only way this is possible is if you inject both times on the window handler. Only suggestion i would have is use the PID and switch between the windows to send keystrokes to that of another window.

Mostly used in say dual clienting in mmorpg games.
Quote Originally Posted by faceofdevil View Post
Only way this is possible is if you inject both times on the window handler. Only suggestion i would have is use the PID and switch between the windows to send keystrokes to that of another window.

Mostly used in say dual clienting in mmorpg games.
Yeap, I tried to get the process Id but still, sendmessage/postmessage is really unreliable imo.. so.. i will move on ^^
/closed by request
Posts 15 of 5 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?