[Tutor] Opening a dos exe
Emile van Sebille
emile at fenx.com
Fri Mar 12 00:54:31 CET 2010
On 3/10/2010 11:33 AM Armstrong, Richard J. said...
>The problem comes in that the dos program requires three
> inputs (input1.txt, input2.txt and input3.txt - see attached picture)
> but I cannot find a way of getting this information to the dos program
> from python. Any ideas?
I've sometimes written python code to create wsh (and other) scripts
that I then run from within python. WSH include a sendkeys command IIRC
that works with dos/command/cmd windows. There's likely ways to use the
win32 api as well (win32api.keybd_event?).
I currently use a tool called macroScheduler from www.mjtnet.com just
for the windows automation tasks I run into (scripted from within python).
There's also http://pypi.python.org/pypi/SendKeys/0.3, but at this point
if I were to start over I'd look closely at
http://www.rutherfurd.net/python/sendkeys/
HTH,
Emile
More information about the Tutor
mailing list