How to manipulate a running software with python? -


how can manipulate software while running using python?

e.g:

i open notepad on windows 7 without write word on it

notepad before

then make program in python receive string , when user click on send button write string notepad.

software python

if write "abc" python software , click on send button should result:

enter image description here

is possible make python script manipulate memory , add string notepad?

you can use windows scripting host send keys. works on python 2.7

import win32com.client shell = win32com.client.dispatch("wscript.shell") shell.run("notepad") shell.appactivate("notepad") shell.sendkeys("a")  shell.sendkeys("b") shell.sendkeys("c") win32api.sleep(500) shell.sendkeys("d") 

you can fine more on this blog.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -