c# - Getting input into a process -


while talking friend on yahoo messenger, told him cool make bot answer generic messages when starts conversation. upon thinking told him, realized quite interesting that. problem don't know win32.

so question this: how 'link' process both 1 , windows environment? goal have application running in background makes sort of query see windows opened , when new yahoo messenger conversation window appears should send list of keystroke events window.

i use either c# or vc++ programming part , can use help: either specific answers or tips me - e.g.: google for. far google research came apps/dlls/code , scripting stuff , i'm not searching that. want work myself can learn it.

http://pinvoke.net/ seems website looking for. site explains how use windows api functions in higher level languages. search on pinvoke of functions i've listed below , gives code necessary able use these functions in application.

you'll want use findwindow function find window in you're interested.
you'll need process id, use getwindowthreadprocessid grab it.
next, you'll need use openprocess allow reading of process's memory.
afterwards, you'll want use readprocessmemory read process's memory see happening it.
lastly, you'll want use postmessage function send key presses window handle.

welcome wonderful world of windows api programming.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -