I finally was able to get the menu controlled. pywinauto does seem to allow it. 
After finding the correct connection, this let me select the menu:
app_dialog.child_window(title="Menu Bar").set_focus()
from there is was a matter of controlling the keyboard with the SendKeys() 
command.
E m r e
 

    On Tuesday, September 25, 2018, 5:40:49 PM GMT+3, Emre CETIN via 
python-win32 <python-win32@python.org> wrote:  
 
 Hello Simon. Thank you for your response. I had read of pywinauto but hadn't 
used it before. After your advise i have been working on it for hours. But 
unfortunately i can not get the menu items. I analyzed it via a tool named 
Swapy and it shows the MenuItems field [] as an empty list. I'm still stuck :/

E m r e
 

    On Tuesday, September 25, 2018, 1:33:01 AM GMT+3, Simon McConnell 
<simonmcconn...@gmail.com> wrote:  
 
 I haven't used it myself but I believe this is what pywinauto does:  
http://pywinauto.github.io
On Tue, 25 Sep 2018 at 02:04 Emre CETIN via python-win32 
<python-win32@python.org> wrote:

Hi, I am writing a script to automate a program named Golden Software Surfer. I 
am using import win32com.client in Python during this process. At one point 
though i can not get past a certain step of my code. The reason is because 
Surfer's automation utility (Scipter) does not allow that part to be 
controlled. I could get past this step if i could control the main program's 
(Surfer) Menu bar. This step just has a couple of processes that all are within 
the Menu bar itself. For example here is what I want to automate:******
1) Arrange | Edit Group2) Edit | Select All
3) Geoprocessing | Change Boundaries | Polyline to Polygon4) Geoprocessing | 
edit Boundaries | Combine Islands / Lakes5) Arrange | Stop Editting Group******
All of these steps aren't changeable via its scripting libraries within 
Scripter. But they are all under the main programs Menu Bar. Is there a way for 
me to automate the menubar via win32com? If so could you please help me 
understand how?
Basically i am trying to learn how to control the menu bar of Surfer from 
Python.

Thank you all in advance.

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

  _______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32
  
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to