pywinauto cannot control remote application. You need a pywinauto copy on remote machine to run it with your app. BTW, you shouldn't minimize RDP window to prevent loosing GUI context. But you can safely switch focus from RDP to another application on your local desktop.

The application you run has separate GUI window, right? If it's just command line utility, probably you don't need pywinauto at all: just use subprocess.Popen with stdin, stdout, stderr parameters. But if it has window(s) separate from cmd.exe, you need separate Application object.

Example (just a schema, I did not test it):

cmd_app = Application.Start("cmd.exe")
cmd_wnd = cmd_app.Window_(title=r"C:\Windows\system32\cmd.exe", class_name="ConsoleWindowClass")
cmd_wnd.TypeKeys("your run cmd string {ENTER}", with_spaces=True)

your_app = Application.Connect(path="path_to_your_app_exe")
print your_app.Windows_()
your_app.SomeMainWindow.PrintControlIdentifiers()
# other actions


Best regards,
-Vasily.


2013/6/14 Spencer Kent <spencer.kent@hp.com>
I guess I don't quite understand why I can't use just start and then have the
correct application object, especially since this is how it's done in the
examples, but I went back and used the connect method once I had opened a
command window by hand. Then when I print control identifiers it doesn't show
any at all (but it doesn't return an error either). I tried .TypeKeys ('Hello,
World') and the text popped up in my python shell. Then I tried .TypeKeys a
second time and then it popped up in my command prompt! I'm not going to have
to put it in there twice when I run it in a script am I?

I'm using the python shell to test out the functionality because I'm trying to
call the command prompt itself. All I want to do is enter text at the command
prompt and press enter. (I'd be running the script on my desktop computer and
trying to control the command prompt of a networked computer through a RDP
connection). This is possible, right? I can run the script to control another
computer's command prompt through the RDP?

Thanks for your quick response


Spencer






------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Pywinauto-users mailing list
Pywinauto-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pywinauto-users