Re: How do I send keystrokes to a console window in Windows XP?

2018-01-08 Thread zxymike93
在 2005年7月16日星期六 UTC+8下午8:46:34,Benji York写道: > googlegro...@garringer.net wrote: > > How do I use Python to send keystrokes to a console window in Windows > > XP? > > import win32com.client > > shell = win32com.client.Dispatch("WScript.Shell") > shell.AppActivate("Command Prompt") > >

Re: How do I send keystrokes to a console window in Windows XP?

2017-11-28 Thread jglobocnik37
On Saturday, July 16, 2005 at 2:46:34 PM UTC+2, Benji York wrote: > googlegro...@garringer.net wrote: > > How do I use Python to send keystrokes to a console window in Windows > > XP? > > import win32com.client > > shell = win32com.client.Dispatch("WScript.Shell") > shell.AppActivate("Command

Re: How do I send keystrokes to a console window in Windows XP?

2005-07-20 Thread RTG
Thank you, Peter. The application is a continuously running interactive program and we want to automatically interact with it (e.g. sendkeys and capture certain text responses). I will look for the thread you mentioned. - Roy -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I send keystrokes to a console window in Windows XP?

2005-07-19 Thread RTG
Benji, This appears to be exactly what we need. I also see that by changing Command Prompt to Notepad or another application, the key strokes are sent there. With this capability, other possibilities open up. Is there a way to read the output from the from the console window? For example, how

Re: How do I send keystrokes to a console window in Windows XP?

2005-07-19 Thread Peter Hansen
RTG wrote: With this capability, other possibilities open up. Is there a way to read the output from the from the console window? For example, how can we capture the output of the dir command? Normally one does that using a call to things like os.popen, or using the new subprocess module. If

Re: How do I send keystrokes to a console window in Windows XP?

2005-07-18 Thread GoogleGroups
Thank you, Benji. This gives me hope, but what I really need to do is to send keystrokes to an already existing console window. Any help there? (P.S. Sorry that I wasn't more specific.) -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I send keystrokes to a console window in Windows XP?

2005-07-18 Thread Benji York
[EMAIL PROTECTED] wrote: This gives me hope, but what I really need to do is to send keystrokes to an already existing console window. That's exactly what the code does. Try it out, you'll see how it works quickly enough. -- Benji York -- http://mail.python.org/mailman/listinfo/python-list

How do I send keystrokes to a console window in Windows XP?

2005-07-14 Thread GoogleGroups
How do I use Python to send keystrokes to a console window in Windows XP? Or perhaps there is an application that I can call to do this? Thank you for your help. -- http://mail.python.org/mailman/listinfo/python-list