i have been having a hard time to find anything that is usefull but i found someone asked how to do that,(How to send keystrokes to a window?)
if used the code and i can set notepad’s text but i want to send keys but sets the text, i
want to send keys like keybd_event i have been using it but i want to only have it send to one program.
keybd_event('a', NULL, NULL, NULL);
keybd_event('a', NULL, KEYEVENTF_KEYUP, NULL);
how could i do that?
Sounds like you’re trying to make a window have the focus before sending your keys. Look at
FindWindowandSetForegroundWindow.Something like this should work:
If instead you’re talking about changing a window’s text directly, look at
GetWindowto navigate the window tree andSendMessagewith aWM_SETTEXTparameter.