
| | | | | | child_window(title="Germany, Berlin", control_type="Text") | | | | | | child_window(title="Location", control_type="Text") | | | | | child_window(title="Location Germany, Berlin", auto_id="dashboard_chooseLocation", control_type="Button") | | | | | child_window(title="Change IP Address", auto_id="ip_change", control_type="Button") | | | | | child_window(title="New IP", control_type="Text") | | | | | child_window(title=" ", control_type="Text") | | | | | child_window(title="Original IP", control_type="Text") | | | | | child_window(title="Disconnect", auto_id="dashboard_switch", control_type="Button")

| | | | | child_window(title="Close", control_type="Button") | | | | | child_window(title="Minimize", control_type="Button") | | | | | child_window(title="Preferences", auto_id="hma_title_preferences", control_type="Button") | child_window(title="AvastChromiumWindow", control_type="Pane") The resulting output is as follows: Control Identifiers:ĭialog - 'HMA VPN' (L-149, T68, R551, B638)Ĭhild_window(title="HMA VPN", control_type="Window")
#Hmawindows 10 code#
My code snippet is as follows: from pywinauto import Desktop, Applicationĭesktop(backend='uia').HMAVPN.dump_tree()Īpp = Application().start('C:\Program Files\Privax\HMA VPN\Vpn.exe', timeout=5)ĭlg_.() I also want to be able to click Button5, "Change IP Address", but once I figure out one button, the other should be easy. I'm looking to be able to toggle Button4 in GroupBox2, which is named either "Connect" or "Disconnect", depending on the current state of the VPN.
.jpg)
I'm fairly sure I'm referring to the control incorrectly when I call it with the click() method, but can anyone suggest the correct approach, given the dump_tree that I have included? (I have tried tens of variations based based on the code snippets in the Getting Started guide, but no joy). I'm sure it's my coding, not the module itself.

The PyWinAuto module would appear to have the required functionality, but I cannot get it to work correctly.
#Hmawindows 10 windows#
I use HMA VPN and am running on Windows 10.
#Hmawindows 10 software#
I am trying to write Python code to request my vpn software to connect / disconnect upon certain conditions.
