How to manipulate a running software with python?

How can i manipulate a software while it running using python?

e.g:

I open a notepad on Windows 7 without write any word on it

How to manipulate a running software with python?

then i make program in python that he receive a string and when the user click on send button it write the String into notepad.

How to manipulate a running software with python?

if i write "abc" into python software and click on send button this should be the result:

How to manipulate a running software with python?

Is it possible make a python script to manipulate the memory and add this string to notepad?

-------------Problems Reply------------

You can use the windows scripting host to 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.

Category:python Views:0 Time:2018-06-12
Tags: python

Related post

  • How to create simple web site with python? 2010-04-21

    How to create simple web site with python? I mean really simple, f.ex, you see text "Hello World", and there are button "submit", which (onClick) will show ajax box "submit successful". I want to start develop some stuff with Python, and I don't know

  • How do you check in Linux with Python if a process is still running? 2008-09-01

    This question already has an answer here: How to check if there exists a process with a given pid? 10 answers The only nice way I've found is: import sys import os try: os.kill(int(sys.argv[1]), 0) print "Running" except: print "Not running" (Source)

  • How can I access Ring 0 with Python? 2011-04-09

    This answer, stating that the naming of classes in Python is not done because of special privileges, here confuses me. How can I access lower rings in Python? Is the low-level io for accessing lower level rings? If it is, which rings I can access wit

  • how to process long-running requests in python workers? 2009-11-04

    I have a python (well, it's php now but we're rewriting) function that takes some parameters (A and B) and compute some results (finds best path from A to B in a graph, graph is read-only), in typical scenario one call takes 0.1s to 0.9s to complete.

  • How to get the system info with Python? 2010-06-23

    I need to get the info under what environment the software is running. Does python have a library for this purpose? I want to know the following info. OS name/version Name of the CPU, clock speed Number of CPU core Size of memory --------------Soluti

  • how to make apache run pyc file (python compiled file) 2011-04-09

    I am using apache2 and python2.6 on linux. I know how to make apache run a *.py file, just add "AddHandler cgi-script .cgi .py" to httpd.conf file. But how to make apache2 run a *.pyc file? Adding "AddHandler cgi-script .cgi .pyc" is not working. I'v

  • How to install pywin32 on virtualenv with python 2.7 64 bit? 2011-11-10

    I wonder right way to install on virtualenv with 64 bit python 2.7 pywin32 module (Operating system is Windows 7 64 bit). I've found exe installer on Sourceforge. When i run easy_installer on command line first everything goes fine but soon i see str

  • How define a Traverse for neo4j with Python? 2011-11-22

    I need to traverse a neo4j graph using Python27. From the manual I've seen that I can define a Traversal and include a Evaluator and I got something similar to that. def my_evaluator(path): if (path.end['type'] == 'STOP') or (path.end['type'] == 'BUS

  • how to display a web page with python? 2012-01-19

    I am learning python at college. I have got a very stupid question. How do i make a web page with python? I do this and save as test.py print "Hello test \n"; print "\n" print "Just testing \n"; When i go to the url I get the same output print "Hello

  • Reading stdout from a running script with Python 2012-01-22

    I have some trouble with python. I am trying to get output from a running script and use it in another script. So, what I want to do is something like this; Suppose the out.py and in.py like these; # out.py def main(): while True: print "test" time.s

  • How to use win32 API's with python? 2009-06-21

    How can I use win32 API in Python? What is the best and easiest way to do it? Can you please provide some examples? --------------Solutions------------- PyWin32 is the way to go - but how to use it? One approach is to begin with a concrete problem yo

  • How do I retrieve Hotmail contacts with python 2010-01-29

    How can I retrieve contacts from hotmail with python? Is there any example? --------------Solutions------------- Hotmail: Windows Live Contacts API If a python interface doesn't exist you may have to resort to screen scraping. use octazen, but you ha

  • How to implement Comet server side with Python? 2010-03-14

    I once tried to implement Comet in PHP. Soon, I found that PHP is not suitable for Comet, since each HTTP request will occupy one process/thread. As a result, it doesn't scale well. I just installed mod_python in my XAMPP. I thought it would be easy

  • How many users could run software that uses OpenGL 3.x? 2010-07-21

    Can I expect users to be able to run software that uses OpenGL 3.x? Can Linux users who have open-source graphics drviers run OpenGL 3.x? I know that Mesa3D 7.8 only supports OpenGL 2.1. I also know that OS X Snow Leopard supports some but not all Op

  • How can I integrate Java classes with Python? 2011-07-10

    I am building website with Python and django. There are ome data mining classes already programmed in java. Can i use those function in djnago via anything like --------------Solutions------------- Try running Django on Jython. I believe it should be

  • Have I misunderstood how to set up Selenium RC with Python? 2011-07-14

    I am having difficulty with Selenium RC. When trying to run scripts in Python, I see the message "Cannot import name webdriver". I'm likely missing something very basic. Let me explain every step I've taken (better to be too granular than too vague..

  • How do you open a URL with Python without using a browser? 2011-12-23

    I want to open a URL with Python code but I don't want to use the "webbrowser" module. I tried that already and it worked (It opened the URL in my actual default browser, which is what I DON'T want). So then I tried using urllib (urlopen) and mechani

  • How to parse dhcpd.conf files with python and bicop? 2012-03-07

    I want to edit files (dhcpd.conf, dns files) with python. I was looking for any option and i found bicop library. I try to do: from bicop import parse parse("/home/tigov/dhcp/dhcpd.conf") and i got: Traceback (most recent call last): File "<stdin

  • How to set a running device with android studio? 2015-03-01

    I want to connect an android device to test my application directly from my environment android studio android studio - http://developer.android.com/sdk/index.html I have a samsung galaxy s5 device, I've connected it to usb, I've installed this drive

  • How to compile and run C++ with MinGW using Eclipse and CDT? 2010-10-20

    I would like to do some C++ development on Windows using Eclipse and the CDT plugin. I use Eclipse Helios SR1 and have installed the CDT plugin. I have also installed MinGW and now I wrote a simple "Hello World" in Eclipse. hello.cpp #include <ios

  • How to solve a stiff ode with Python? 2012-01-05

    I'm a Python beginner. I'm trying to switch some programs that I have in matlab. I need solve a stiff ode equation, whose inputs are all matrices. In matlab I use [ttT,uT] = ode23s('SST',t,fT); --------------Solutions------------- For most things you

  • How to read a database created with python with R 2013-07-24

    I've created a database with the python package sqlite3. import sqlite3 conn=sqlite3.connect('foo.sqlite') c=conn.cursor() c.execute('CREATE TABLE foo (bar1 int, bar2 int)') conn.commit() conn.close Then for statistical purposes I try to read this da

  • I have installed windows 7 (home prem.) but find it is not compatible with programs designed to run off XP, Vista etc. how do I now run software for translating? 2013-02-25

    I have a software disc used for translating/transcribing interviews, it is not designed to run on Windows 7, can I keep some of the XP or vista capability. I have had a lot of problems since upgrading to Windows 7 not least with printers etc. beginni

  • how do you protect your source with python? 2011-03-28

    python has been used to develop commercial software, but how can you make money from your programs if the source is always available? --------------Solutions------------- Your source isn't as valuable as you think it is, that is to say, you won't mak

  • How to prevent log file truncation with python logging module? 2009-10-05

    I need to use python logging module to print debugging info to a file with statements like: logging.debug(something) The file is truncated (i am assuming - by the logging module) and the messages get deleted before I can see them - how can that be pr

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.179 (s). 11 q(s)