Search code examples
pythonwindows-xppywinauto

Controlling a program with "pywinauto" (Windows XP)


I'm almost new to Python and i started using the module "pywinauto" to control a program i'm using for my thesis.

I'm doing everything right like this: from pywinauto import application

prog=application.Application()
prog.start_('RAMPlus.exe')
prog.RAMPlus.MenuSelect('File->New')

Until here everything is fine but now the "New" window is something like this:

screebshot of new window

2 tables, 1 named "Upper Left" and the other "Lower Right". Each table has two lines "Lat:" and "Long:" and in each line you have 3 rows. I need to modify the value of each row

If i try

a.New.UpperLeftCombo.Click() 

i get the message "pywinauto.controls.win32_controls.StaticWrapper object at 0x013A9BF0>" so i think the "pywinauto" acknowledges the "Upper left" and the "Lower right" but the rest i have no idea how to select.

Any ideas?

P.S: I saw somewhere that the creator of pywinauto, the user "markm" answers questions here.Can i tag him or something like that in this post so he can see it? I'm new to the site so don't know

Thank you very much in advance for the help

EDIT:do you know if i can copy the whole content of a window to a txt file with pywinauto?


Solution

  • I'm managing to get around it with Swapy, so this question is solved.

    One more question guys, with is it that "pywinauto" and "swapy" don't work on 64-bit systems? I have two workspaces, one 32-bit and one 64-bit and i really would like to work in both of them