[
  {
    "path": "Basic User Input Mod.md",
    "content": "# 用户基本输入模块\n\n[TOC]\n\n## pywinauto.mouse\n\n跨平台来模拟鼠标事件\n\n`pywinauto.mouse.click(*button='left', coords=(0, 0))`\n\n点击指定的坐标\n\n`pywinauto.mouse.click(*button='left', coords=(0, 0))`\n\n\n\n\n\n## pywinauto.keyboard\n\n键盘输入仿真模块\n\n通过调用`SendKeys`方法自动将键入到活动窗口。您可以使用任何Unicode字符（在Windows上）和下面列出的一些特殊键。该模块也可在Linux上使用。\n\n可用键码：\n\n```\n{ SCROLLLOCK }， { VK_SPACE }， { VK_LSHIFT }， { VK_PAUSE }， { VK_MODECHANGE }，\n{ BACK }， { VK_HOME }， { F23 }， { F22 }， { F21 }， { F20 }， { VK_HANGEUL }， { VK_KANJI }，\n{ VK_RIGHT }， { BS }， { HOME }， { VK_F4 }， { VK_ACCEPT}， { VK_F18 }， { VK_SNAPSHOT }，\n{ VK_PA1 }， { VK_NONAME }， { VK_LCONTROL }， { ZOOM }， { VK_ATTN }， { VK_F10 }， { VK_F22 }，\n{ VK_F23 }， { VK_F20 }， { VK_F21 }  { VK_SCROLL }， { TAB }， { VK_F11 }， { VK_END }，\n{ LEFT }， {VK_UP }， { NUMLOCK }， { VK_APPS }， { PGUP }， { VK_F8 }， { VK_CONTROL }，\n{ VK_LEFT }， { PRTSC }， { VK_NUMPAD4 }， { CAPSLOCK }， { VK_CONVERT }， { VK_PROCESSKEY }，\n{ ENTER } ， { VK_SEPARATOR }， { VK_RWIN }， { VK_LMENU }， { VK_NEXT }， { F1}， { F2 }，\n{ F3 }， { F4 }， { F5 }， { F6 }， { F7 }， { F8 }， { F9 }， { VK_ADD }， { VK_RCONTROL }，\n{ VK_RETURN }， { BREAK }， { VK_NUMPAD9 }， { VK_NUMPAD8 }， { RWIN }， { VK_KANA }，\n{ PGDN }， { VK_NUMPAD3}， { DEL }， { VK_NUMPAD1 }， { VK_NUMPAD0 }， { VK_NUMPAD7 }，\n{ VK_NUMPAD6 }， { VK_NUMPAD5 }， { DELETE }， { VK_PRIOR }， { VK_SUBTRACT }， { HELP }，\n{ VK_PRINT }， { VK_BACK }  { CAP }， { VK_RBUTTON }， { VK_RSHIFT }， { VK_LWIN }， { DOWN }，\n{ VK_HELP }， { VK_NONCONVERT }， { BACKSPACE }， { VK_SELECT }， { VK_TAB }， { VK_HANJA }，\n{ VK_NUMPAD2 }， { INSERT }， { VK_F9 }， { VK_DECIMAL }， { VK_FINAL }， { VK_EXSEL }，\n{ RMENU }， { VK_F3 }， { VK_F2 }， { VK_F1 }， { VK_F7 }， {VK_F6 }， { VK_F5 }， { VK_CRSEL }，\n{ VK_SHIFT }， { VK_EREOF }， { VK_CANCEL }， { VK_DELETE }， { VK_HANGUL }， { VK_MBUTTON }，\n{ VK_NUMLOCK }， { VK_CLEAR }， { END }， { VK_MENU } ， { SPACE }， { BKSP }， { VK_INSERT }，\n{ F18 }， { F19}， { ESC }， { VK_MULTIPLY }， { F12 }， { F13 }， { F10 }， { F11 }， { F16 }，\n{ F17 }， { F14 }， { F15 }， { F24 }， { RIGHT }  { VK_F24 }， { VK_CAPITAL }， { VK_LBUTTON }，\n{ VK_OEM_CLEAR }， { VK_ESCAPE }， { UP}， { VK_DIVIDE }， { INS }， { VK_JUNJA }，\n{ VK_F19 }， { VK_EXECUTE }， { VK_PLAY }， { VK_RMENU }， { VK_F13 }， { VK_F12 }， { 伦}，\n{ VK_DOWN }， { VK_F17 }  { VK_F16 }， { VK_F15 }， { VK_F14 }\n```\n\n**修饰符：**\n\n- `'+': {VK_SHIFT}`\n- `'^': {VK_CONTROL}`\n- `'%': {VK_MENU}` 又名Alt键\n\n示例如何使用修饰符：\n\n```python\nSendKeys('^a^c') # select all (Ctrl+A) and copy to clipboard (Ctrl+C)\nSendKeys('+{INS}') # insert from clipboard (Shift+Ins)\nSendKeys('%{F4}') # close an active window with Alt+F4\n```\n\n可以为特殊键指定重复计数。`{ENTER 2}`意思是按两次Enter"
  },
  {
    "path": "How To's.md",
    "content": "# How To‘s\n\n[TOC]\n\n### 指定可用的Application实例\n\n一个`Application`实例是所有使用这个你正在自动化操作的应用程序的联系者。因此这个应用程序实例需要连接到进程中，有下面两种方法实现：\n\n`start （self ， cmd_line ， timeout = app_start_timeout ） `\n\n`connect （self ， ** kwargs ）  `\n\n`start()`被用来在这个程序没有运行但你需要启动它的时候\n\n`app = Application().start(r\"c:\\path\\to\\your\\application -a -n -y --arguments\")`\n\n其中超时参数是可选的，如果应用程序需要很长时间来启动，则只需要使用该参数。\n\n`connect()`是当自动化程序已经启动时来使用，要指定以运行的应用程序你需要指定以下选项之一：\n\n- 进程： 应用的过程ID\n\n  `app = Application().connect(process=2341)`\n\n- 句柄：应用程序的窗口句柄\n\n  `app = Application().connect(handle=0x010f0c)`\n\n- 路径：进程中可执行文件路径（`GetModuleFileNameEx`)用于查找每个进程的路径并将其传入的值进行比较）\n\n  `app  =  Application().connect （path = r “c：\\ windows \\ system32 \\ notepad.exe” ）`\n\n或任何窗口参数的组合，都会传递给[`pywinauto.findwindows.find_elements()`](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.findwindows.html#pywinauto.findwindows.find_elements)函数，例如：\n\n`app  =  Application().connect （title_re = “。* Notepad” ， class_name = “Notepad” ）`\n\n注意：应用程序在你使用`connect()`之前必须准备好。在`start()`执行之后寻找应用程序，它是没有超时或重试的。因此，如果你在`pywinauto`之外启动程序，你需要睡眠或者编写一个循环等待来等待应用程序完全启动。\n\n\n\n### 如何制定应用程序的对话框\n\n一旦应用程序实例知道了被连接的窗口在工作，那么就需要指定这个窗口。\n\n例如：\n\n`dlg = app.Notepad`\n\n`dlg = app['Notepad']`\n\n接下来是一个最简单的方法，去询问`top_window()`函数\n\n`dlg = app.top_window()`\n\n它将返回这个应用程序最高层级的窗口\n\n**注意：这是目前尚未测试的，所以我们并不清楚它是否会正确的返回**\n\n如果上述还不能进行有效控制，那么你可以使用项目参数传递给`findwindows.find.window()`\n\n`dlg = app.window(title_re=\"Page Setup\", class_name=\"#32770\")`\n\n最后介绍一个你可以进行多控制的方法\n\n`dialogs = app.windows()`\n\n这将返回应用程序中所有可见，启用的顶层窗口列表，然后你就可以使用`handleprops`模块中的某些方法所选用的对话框，一旦你拥有其句柄，就可以使用\n\n`app.window(handle=win)`\n\n**注意：如果对话框的标题很长，那么访问属性可能会是很长的类型，在此情况下，通常使用**\n\n`app.window(title_re=\".*Part of Title.*\")`\n\n\n\n### 如何在对话框上指定控件\n\n有很多方法，最简单的就是\n\n```python\napp.dlg.control\napp['dlg']['control']\n```\n\n对非英文的环境来说，需要传递`unicode`字符，则\n\n`app[u'your dlg title'][u'your ctrl title']`\n\n代码依据如下内容来构建多个标识符：\n\n- 标题\n- 相关类\n- 标题 + 相关类\n\n如果标签的文本为空（或者删除不能使用的字符后为），那么文本就不能被使用。相反，我们会寻找上面和最右边的控制，并附加其相关类，所以列表就是：\n\n- 相关类\n- 联系最紧密的文字+ 相关类\n\n一旦对话框中所有控件创建了一组标识符，我们就将它们消除歧义\n\n使用`WindowSpecification.print_control_identifiers() `\n\n例如\n\n```python\ndlg_spec = app['无标题 - 记事本']\ndlg_spec.print_control_identifiers()\n>>>\nControl Identifiers:\n\nDialog - '无标题 - 记事本'    (L481, T434, R1281, B802)\n['无标题 - 记事本Dialog', 'Dialog', '无标题 - 记事本']\nchild_window(title=\"无标题 - 记事本\", control_type=\"Window\")\n   | \n   | Edit - '文本编辑器'    (L489, T485, R1273, B794)\n   | ['', 'Edit', '0', '1']\n   | child_window(title=\"文本编辑器\", auto_id=\"15\", control_type=\"Edit\")\n   |    | \n   |    | ScrollBar - '垂直滚动条'    (L1256, T485, R1273, B794)\n   |    | ['垂直滚动条ScrollBar', '垂直滚动条', 'ScrollBar']\n   |    | child_window(title=\"垂直滚动条\", auto_id=\"NonClientVerticalScrollBar\", control_type=\"ScrollBar\")\n   |    |    | \n   |    |    | Button - '上一行'    (L1256, T485, R1273, B502)\n   |    |    | ['上一行', '上一行Button', 'Button', 'Button0', 'Button1']\n   |    |    | child_window(title=\"上一行\", auto_id=\"UpButton\", control_type=\"Button\")\n   |    |    | \n   |    |    | Button - '下一行'    (L1256, T777, R1273, B794)\n   |    |    | ['下一行', '下一行Button', 'Button2']\n   |    |    | child_window(title=\"下一行\", auto_id=\"DownButton\", control_type=\"Button\")\n   | \n   | TitleBar - 'None'    (L505, T437, R1273, B465)\n   | ['2', 'TitleBar']\n   |    | \n   |    | Menu - '系统'    (L489, T442, R511, B464)\n   |    | ['系统Menu', '系统', 'Menu', '系统0', '系统1', 'Menu0', 'Menu1']\n   |    | child_window(title=\"系统\", auto_id=\"MenuBar\", control_type=\"MenuBar\")\n   |    |    | \n   |    |    | MenuItem - '系统'    (L489, T442, R511, B464)\n   |    |    | ['系统2', 'MenuItem', '系统MenuItem', 'MenuItem0', 'MenuItem1']\n   |    |    | child_window(title=\"系统\", control_type=\"MenuItem\")\n   |    | \n   |    | Button - '最小化'    (L1134, T435, R1181, B465)\n   |    | ['最小化Button', '最小化', 'Button3']\n   |    | child_window(title=\"最小化\", control_type=\"Button\")\n   |    | \n   |    | Button - '最大化'    (L1181, T435, R1227, B465)\n   |    | ['最大化Button', '最大化', 'Button4']\n   |    | child_window(title=\"最大化\", control_type=\"Button\")\n   |    | \n   |    | Button - '关闭'    (L1227, T435, R1274, B465)\n   |    | ['关闭', '关闭Button', 'Button5']\n   |    | child_window(title=\"关闭\", control_type=\"Button\")\n   | \n   | Menu - '应用程序'    (L489, T465, R1273, B484)\n   | ['应用程序', 'Menu2', '应用程序Menu']\n   | child_window(title=\"应用程序\", auto_id=\"MenuBar\", control_type=\"MenuBar\")\n   |    | \n   |    | MenuItem - '文件(F)'    (L489, T465, R541, B484)\n   |    | ['文件(F)MenuItem', 'MenuItem2', '文件(F)']\n   |    | child_window(title=\"文件(F)\", control_type=\"MenuItem\")\n   |    | \n   |    | MenuItem - '编辑(E)'    (L541, T465, R594, B484)\n   |    | ['MenuItem3', '编辑(E)', '编辑(E)MenuItem']\n   |    | child_window(title=\"编辑(E)\", control_type=\"MenuItem\")\n   |    | \n   |    | MenuItem - '格式(O)'    (L594, T465, R650, B484)\n   |    | ['格式(O)', '格式(O)MenuItem', 'MenuItem4']\n   |    | child_window(title=\"格式(O)\", control_type=\"MenuItem\")\n   |    | \n   |    | MenuItem - '查看(V)'    (L650, T465, R704, B484)\n   |    | ['查看(V)MenuItem', '查看(V)', 'MenuItem5']\n   |    | child_window(title=\"查看(V)\", control_type=\"MenuItem\")\n   |    | \n   |    | MenuItem - '帮助(H)'    (L704, T465, R759, B484)\n   |    | ['帮助(H)', 'MenuItem6', '帮助(H)MenuItem']\n   |    | child_window(title=\"帮助(H)\", control_type=\"MenuItem\")\n\n\n```\n\n注意：此方法打印的标识符已经通过标识的唯一进程。所以如果你有两个编辑框，它们都会在其中列出。实际上，第一个可以被称之为“编辑”，“编辑0”，“编辑1”和第二个应该被称为“编辑2”\n\n注意：你不需要精确！\n\n\n\n### 如何使用pywinauto在英文之外的环境\n\n在py2中，Python的编码一直是蛋疼的问题，但是py3的出现改变了这一现状。Python3中，字符串是以Unicode编码的，也就是说，Python的字符串支持多语言。使用如下方法来进行属性控制\n\n> 在英文文档中，此部分还是以Python2为基础\n\n1. `app.dialog_ident.control_ident.click()`\n2. `app['dialog_ident']['control_ident'].click()`\n3. `app.window(title_re=\"NonAsciiCharacters\").window(title=\"MoreNonAsciiCharacters\").click()`\n\n\n\n### 如何处理不按照预期进行响应的控件（例如OwnerDraw控件）\n\n一些控件不按照预期的方式响应事件。例如，如果你查看任何HLP文件，并转到索引选项（单击”搜索“按钮），您将会看见一个列表框。运行控件查看工具（spy++）你就发现它确实是一个列表，但是是`ownerdrawn`。这意味着开发人员以及告诉windows，它们会覆盖项目的显示方式。在这种情况下，这样的一些字符串无法被检索。\n\n这些问题是怎么导致的那？\n\n```python\napp.HelpTopics.ListBox.texts()                # 1\napp.HelpTopics.ListBox.select(\"ItemInList\")   # 2\n```\n\n1. 这将返回空字符串的列表，这意味着`pywinauto`无法获取列表框中的字符串\n2. 这将因为`IndexError`而失败，因为`ListBox`中的`select（string）`模块查找文本中的项目去了解其索引。\n\n应用此控件的解决方法：\n\n`app.HelpTopics.ListBox.select(1)`\n\n这将选择列表框中的第二个项目，因为这不是正确的查找字符串。\n\n不幸的是，它永远不会工作。开发人员可以使其控制不响应事件，如`select`。在这种情况下，您可以使用`TypeKeys()`的键盘模拟来选择列表框中的项目。\n\n\n\n这允许您将任何按键发送到控件。所以选择第三个项目你应该使用\n\n`app.Helptopics.ListBox1.type_keys(\"{HOME}{DOWN 2}{ENTER}\")`\n\n- `{HOME}` 将确保第一个项目被突出显示。\n- `{DOWN 2}` 然后将亮点向下移动两项\n- `{ENTER}` 将选择突出显示的项目\n\n如果你的应用程序广泛使用类似的控件类型，那么你可以通过从`ListBox`派生一个新类来简化使用，可以作为你特定程序的额外知识\n\n\n\n###  如何访问系统托盘（SysTray，通知区域）\n\n```python\nimport pywinauto.application\napp = pywinauto.application.Application().connect(path=\"explorer\")\nsystray_icons = app.ShellTrayWnd.NotificationAreaToolbar\n```\n\n任务栏模块提供对系统托盘的初步访问。\n\n它定义了以下变量:\n\n- explorer_app\n\n  定义连接到正在运行的资源管理器的`Application()`对象。你可能不需要直接使用它。\n\n- 任务栏\n\n  任务栏的句柄(包括开始按钮，QuickLaunch图标，正在运行的任务等)\n\n- 开始按钮\n\n  “启动我”:-)我想你可能会知道这是什么！\n\n- 快速启动\n\n  具有快速启动图标的工具栏\n\n- SystemTray中\n\n  包含时钟和系统托盘图标的窗口\n\n- 时钟\n\n- SystemTrayIcons\n\n  表示系统托盘图标的工具栏\n\n- RunningApplications\n\n  工具条表示运行中的应用程序\n\n我还在模块中提供了两个可以用来点击系统托盘图标的功能：\n\n- `ClickSystemTrayIcon(button)`\n\n  您可以使用此按钮左键单击系统托盘中的可见图标。我不得不具体说可见的图标，因为可能有许多看不见的图标显然不能被点击。按钮可以是任意整数。如果您指定3，那么它会找到并单击第3个可见按钮。（几乎不会在这里执行错误检查，但这种方法将来会更有可能被移动/重命名。）\n\n- `RightClickSystemTrayIcon(button)`\n\n  类似于`ClickSytemTrayIcon`但执行右键单击。\n\n通常，当您点击/右键单击图标时，您将收到一个弹出菜单。在这一点上要记住的是，弹出菜单是应用程序的一部分，而不是资源管理器的一部分。\n\n例如：\n\n```python\n# connect to outlook\noutlook = Application.connect(path='outlook.exe')\n\n# click on Outlook's icon\ntaskbar.ClickSystemTrayIcon(\"Microsoft Outlook\")\n\n# Select an item in the popup menu\noutlook.PopupMenu.Menu().get_menu_path(\"Cancel Server Request\")[0].click()\n```\n\n"
  },
  {
    "path": "Main User Modules.md",
    "content": ""
  },
  {
    "path": "Methods available to each different control type.md",
    "content": "# Methods available to each different control type\n\nWindows有很多控件，按钮，列表等\n\n[TOC]\n\n### 所有控件\n\n这些函数适用于所有控件\n\n- [capture_as_image](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.capture_as_image)\n- [click](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.click)\n- [click_input](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.click_input)\n- [close](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.close)\n- [close_click](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.close_click)\n- [debug_message](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.debug_message)\n- [double_click](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.double_click)\n- [double_click_input](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.double_click_input)\n- [drag_mouse](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.drag_mouse)\n- [draw_outline](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.draw_outline)\n- [get_focus](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.get_focus)\n- [get_show_state](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.get_show_state)\n- [maximize](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.maximize)\n- [menu_select](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.menu_select)\n- [minimize](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.minimize)\n- [move_mouse](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.move_mouse)\n- [move_window](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.move_window)\n- [notify_menu_select](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.notify_menu_select)\n- [notify_parent](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.notify_parent)\n- [press_mouse](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.press_mouse)\n- [press_mouse_input](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.press_mouse_input)\n- [release_mouse](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.release_mouse)\n- [release_mouse_input](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.release_mouse_input)\n- [restore](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.restore)\n- [right_click](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.right_click)\n- [right_click_input](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.right_click_input)\n- [send_message](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.send_message)\n- [send_message_timeout](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.send_message_timeout)\n- [set_focus](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.set_focus)\n- [set_window_text](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.set_window_text)\n- [type_keys](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.type_keys)\n- [Children](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Children)\n- [Class](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Class)\n- [ClientRect](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.ClientRect)\n- [ClientRects](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.ClientRects)\n- [ContextHelpID](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.ContextHelpID)\n- [ControlID](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.ControlID)\n- [ExStyle](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.ExStyle)\n- [Font](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Font)\n- [Fonts](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Fonts)\n- [FriendlyClassName](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.FriendlyClassName)\n- [GetProperties](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.GetProperties)\n- [HasExStyle](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.HasExStyle)\n- [HasStyle](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.HasStyle)\n- [IsChild](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.IsChild)\n- [IsDialog](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.IsDialog)\n- [IsEnabled](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.IsEnabled)\n- [IsUnicode](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.IsUnicode)\n- [IsVisible](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.IsVisible)\n- [Menu](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Menu)\n- [MenuItem](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.MenuItem)\n- [MenuItems](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.MenuItems)\n- [Owner](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Owner)\n- [Parent](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Parent)\n- [PopupWindow](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.PopupWindow)\n- [ProcessID](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.ProcessID)\n- [Rectangle](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Rectangle)\n- [Style](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Style)\n- [Texts](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.Texts)\n- [TopLevelParent](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.TopLevelParent)\n- [UserData](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.UserData)\n- [VerifyActionable](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.VerifyActionable)\n- [VerifyEnabled](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.VerifyEnabled)\n- [VerifyVisible](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.VerifyVisible)\n- [WindowText](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper.WindowText)\n\n### 按钮，复选框，单选按钮， 分租框\n\n- [ButtonWrapper.Check](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ButtonWrapper.Check)\n- [ButtonWrapper.GetCheckState](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ButtonWrapper.GetCheckState)\n- [ButtonWrapper.SetCheckIndeterminate](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ButtonWrapper.SetCheckIndeterminate)\n- [ButtonWrapper.UnCheck](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ButtonWrapper.UnCheck)\n\n### 组合框\n\n- [ComboBoxWrapper.DroppedRect](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ComboBoxWrapper.DroppedRect)\n- [ComboBoxWrapper.ItemCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ComboBoxWrapper.ItemCount)\n- [ComboBoxWrapper.ItemData](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ComboBoxWrapper.ItemData)\n- [ComboBoxWrapper.ItemTexts](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ComboBoxWrapper.ItemTexts)\n- [ComboBoxWrapper.Select](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ComboBoxWrapper.Select)\n- [ComboBoxWrapper.SelectedIndex](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ComboBoxWrapper.SelectedIndex)\n\n### 对话\n\n- [DialogWrapper.ClientAreaRect](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.DialogWrapper.ClientAreaRect)\n- [DialogWrapper.RunTests](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.DialogWrapper.RunTests)\n- [DialogWrapper.WriteToXML](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.DialogWrapper.WriteToXML)\n\n### 编辑\n\n- [EditWrapper.GetLine](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.EditWrapper.GetLine)\n- [EditWrapper.LineCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.EditWrapper.LineCount)\n- [EditWrapper.LineLength](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.EditWrapper.LineLength)\n- [EditWrapper.Select](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.EditWrapper.Select)\n- [EditWrapper.SelectionIndices](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.EditWrapper.SelectionIndices)\n- [EditWrapper.SetEditText](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.EditWrapper.SetEditText)\n- [EditWrapper.set_window_text](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.EditWrapper.set_window_text)\n- [EditWrapper.TextBlock](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.EditWrapper.TextBlock)\n\n### 头\n\n- [HeaderWrapper.GetColumnRectangle](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.HeaderWrapper.GetColumnRectangle)\n- [HeaderWrapper.GetColumnText](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.HeaderWrapper.GetColumnText)\n- [HeaderWrapper.ItemCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.HeaderWrapper.ItemCount)\n\n### 列表框\n\n- [ListBoxWrapper.GetItemFocus](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ListBoxWrapper.GetItemFocus)\n- [ListBoxWrapper.ItemCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ListBoxWrapper.ItemCount)\n- [ListBoxWrapper.ItemData](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ListBoxWrapper.ItemData)\n- [ListBoxWrapper.ItemTexts](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ListBoxWrapper.ItemTexts)\n- [ListBoxWrapper.Select](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ListBoxWrapper.Select)\n- [ListBoxWrapper.SelectedIndices](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ListBoxWrapper.SelectedIndices)\n- [ListBoxWrapper.SetItemFocus](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.win32_controls.html#pywinauto.controls.win32_controls.ListBoxWrapper.SetItemFocus)\n\n### 列表显示\n\n- [ListViewWrapper.Check](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.Check)\n- [ListViewWrapper.ColumnCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.ColumnCount)\n- [ListViewWrapper.Columns](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.Columns)\n- [ListViewWrapper.ColumnWidths](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.ColumnWidths)\n- [ListViewWrapper.GetColumn](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.GetColumn)\n- [ListViewWrapper.GetHeaderControl](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.GetHeaderControl)\n- [ListViewWrapper.GetItem](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.GetItem)\n- [ListViewWrapper.GetSelectedCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.GetSelectedCount)\n- [ListViewWrapper.IsChecked](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.IsChecked)\n- [ListViewWrapper.IsFocused](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.IsFocused)\n- [ListViewWrapper.IsSelected](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.IsSelected)\n- [ListViewWrapper.ItemCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.ItemCount)\n- [ListViewWrapper.Items](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.Items)\n- [ListViewWrapper.Select](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.Select)\n- [ListViewWrapper.Deselect](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.Deselect)\n- [ListViewWrapper.UnCheck](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ListViewWrapper.UnCheck)\n\n### 弹出菜单\n\n### Robar\n\n### 静态栏\n\n### 状态栏\n\n- [StatusBarWrapper.BorderWidths](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.StatusBarWrapper.BorderWidths)\n- [StatusBarWrapper.GetPartRect](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.StatusBarWrapper.GetPartRect)\n- [StatusBarWrapper.GetPartText](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.StatusBarWrapper.GetPartText)\n- [StatusBarWrapper.PartCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.StatusBarWrapper.PartCount)\n- [StatusBarWrapper.PartRightEdges](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.StatusBarWrapper.PartRightEdges)\n\n### Tab控制\n\n- [TabControlWrapper.GetSelectedTab](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TabControlWrapper.GetSelectedTab)\n- [TabControlWrapper.GetTabRect](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TabControlWrapper.GetTabRect)\n- [TabControlWrapper.GetTabState](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TabControlWrapper.GetTabState)\n- [TabControlWrapper.GetTabText](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TabControlWrapper.GetTabText)\n- [TabControlWrapper.RowCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TabControlWrapper.RowCount)\n- [TabControlWrapper.Select](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TabControlWrapper.Select)\n- [TabControlWrapper.TabCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TabControlWrapper.TabCount)\n- [TabControlWrapper.TabStates](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TabControlWrapper.TabStates)\n\n### 工具栏\n\n- [ToolbarWrapper.Button](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ToolbarWrapper.Button)\n\n- [ToolbarWrapper.ButtonCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ToolbarWrapper.ButtonCount)\n\n- [ToolbarWrapper.GetButton](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ToolbarWrapper.GetButton)\n\n- [ToolbarWrapper.GetButtonRect](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ToolbarWrapper.GetButtonRect)\n\n- [ToolbarWrapper.GetToolTipsControl](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ToolbarWrapper.GetToolTipsControl)\n\n- [ToolbarWrapper.PressButton](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ToolbarWrapper.PressButton)\n\n  ToolbarButton*（返回`Button()`）\n\n\n- [ToolbarButton.Rectangle](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.Rectangle)\n- [ToolbarButton.Style](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.Style)\n- [ToolbarButton.click_input](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.click_input)\n- [ToolbarButton.Click](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.Click)\n- [ToolbarButton.IsCheckable](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.IsCheckable)\n- [ToolbarButton.IsChecked](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.IsChecked)\n- [ToolbarButton.IsEnabled](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.IsEnabled)\n- [ToolbarButton.IsPressable](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.IsPressable)\n- [ToolbarButton.IsPressed](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.IsPressed)\n- [ToolbarButton.State](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._toolbar_button.State)\n\n### 工具提示\n\n- [ToolTipsWrapper.GetTip](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ToolTipsWrapper.GetTip)\n- [ToolTipsWrapper.GetTipText](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ToolTipsWrapper.GetTipText)\n- [ToolTipsWrapper.ToolCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.ToolTipsWrapper.ToolCount)\n\n### 数视图\n\n- [TreeViewWrapper.EnsureVisible](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TreeViewWrapper.EnsureVisible)\n- [TreeViewWrapper.GetItem](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TreeViewWrapper.GetItem)\n- [TreeViewWrapper.GetProperties](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TreeViewWrapper.GetProperties)\n- [TreeViewWrapper.IsSelected](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TreeViewWrapper.IsSelected)\n- [TreeViewWrapper.ItemCount](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TreeViewWrapper.ItemCount)\n- [TreeViewWrapper.Root](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TreeViewWrapper.Root)\n- [TreeViewWrapper.Select](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.TreeViewWrapper.Select)\n\n*TreeViewElement*（由`GetItem()`和返回`Root()`）\n\n- [TreeViewElement.Children](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._treeview_element.Children)\n- [TreeViewElement.Item](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._treeview_element.Item)\n- [TreeViewElement.Next](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._treeview_element.Next)\n- [TreeViewElement.Rectangle](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._treeview_element.Rectangle)\n- [TreeViewElement.State](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._treeview_element.State)\n- [TreeViewElement.SubElements](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._treeview_element.SubElements)\n- [TreeViewElement.Text](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls._treeview_element.Text)\n\n### UpDown\n\n- [UpDownWrapper.GetBase](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.UpDownWrapper.GetBase)\n- [UpDownWrapper.GetBuddyControl](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.UpDownWrapper.GetBuddyControl)\n- [UpDownWrapper.GetRange](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.UpDownWrapper.GetRange)\n- [UpDownWrapper.GetValue](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.UpDownWrapper.GetValue)\n- [UpDownWrapper.SetValue](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.UpDownWrapper.SetValue)\n- [UpDownWrapper.Increment](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.UpDownWrapper.Increment)\n- [UpDownWrapper.Decrement](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.common_controls.html#pywinauto.controls.common_controls.UpDownWrapper.Decrement)\n\n"
  },
  {
    "path": "README.md",
    "content": "# zh-pywinauto-doc\n\n[TOC]\n\n[Pywinauto](https://pywinauto.github.io/)的中文翻译。\n\n`Pywinauto`是一个GUI自动化库，它是用`python`写的，而且可以很好的支持Windows GUI。\n\n因为我在做Windows Desktop Application GUI Automation Test用到了这个库，因此顺便翻译了文档。\n\n\n\n## 安装\n\n- 直接使用`pip install --upgrade pywinauto` (Py2.7+, Py3.3+)\n\n或者也可以手动安装：\n\n- 安装 [pyWin32 extensions](http://sourceforge.net/projects/pywin32/files/pywin32/) \n- 下载 [six](https://pypi.python.org/pypi/six)并执行 `python setup.py install`来安装\n- 下载 [comtypes](https://github.com/enthought/comtypes/releases) 并执行 `python setup.py install`来安装\n- 下载 [the latest pywinauto](https://github.com/pywinauto/pywinauto/zipball/master/) 并执行 `python setup.py install`来安装\n\n或者在Linux下安装：\n\n- [six](https://pypi.python.org/pypi/six)\n- [python-xlib](https://github.com/python-xlib/python-xlib/releases)\n- 执行 `python setup.py install` 对每一个依赖`pywinauto`的包\n\n\n\n## 支持的控件\n\n- 标准Win32控件：MFC, WTL, VB6和其他一些使用WinForms的老应用\n- 所有基于MS UI Automation的标准部件：WPF, Qt, 所有浏览器, Windows文件资源管理器和其他\n\n\n\n## 详细文档\n\n[入门](https://github.com/fangchaooo/zh-pywinauto-doc/blob/master/What%20is%20pywinauto.md)\n\n[怎样使用](https://github.com/fangchaooo/zh-pywinauto-doc/blob/b83093cf125240ceff2fde5f7fe5ef26d0d4fcfc/How%20To's.md)\n\n[等待操作](https://github.com/fangchaooo/zh-pywinauto-doc/blob/b83093cf125240ceff2fde5f7fe5ef26d0d4fcfc/Waiting%20for%20Long%20Operations.md)\n\n[各种不同控件类型可用模块](https://github.com/fangchaooo/zh-pywinauto-doc/blob/b83093cf125240ceff2fde5f7fe5ef26d0d4fcfc/Methods%20available%20to%20each%20different%20control%20type.md)\n\n\n\n"
  },
  {
    "path": "Waiting for Long Operations.md",
    "content": "# Waiting for Long Operations\n\n[TOC]\n\nGUI应用程序行为通常是不稳定的，您的脚本需要等待直到出现新窗口或现有窗口被关闭/隐藏。pywinauto可以隐含地等待对话初始化（默认超时）。有几种方法/功能可以帮助您使代码更容易，更可靠。\n\n### 申请方式\n\n- `wait_cpu_usage_lower`\n\n  该方法对于允许在另一个线程中进行延迟初始化的多线程接口是有用的，而GUI响应并且所有控件已经存在并且可以使用。所以等待一个特定的窗口存在/状态是无用的。在这种情况下，整个过程的CPU使用情况表明任务计算尚未完成.\n\n  `app.wait_cpu_usage_lower(threshold=5) # 等到CPU使用率低于5％`\n\n\n\n###  WindowSpecification方法\n\n所有控件都可以使用\n\n- `wait`\n- `wait_not`\n\n一个`WindowSpecification`对象不一定与现有的窗口/控件相关。这只是一个描述，即搜索窗口的几个条件。该`wait`方法（如果没有引发任何异常）可以保证目标控件存在，甚至可见，启用或活动。\n\n\n\n### `timings`模块功能\n\n对任何Python代码都有用的低级方法\n\n- wait_until\n- wait_until_passes\n\n装饰器`pywinauto.timings.always_wait_until()`和`pywinauto.timings.always_wait_until_passes()`可以被每个函数进行调用。\n\n```python\n＃call ensure_text_changed(ctrl)每2秒，直到通过或超时(4秒)过期\n\n@always_wait_until_passes(4, 2)\ndef  ensure_text_changed(CTRL)：\n    if previous_text  ==  CTRL 。window_text()：\n        raise  ValueError ('ctrl文本保持不变而改变是预期的')\n```\n\n\n\n### 识别控制\n\n帮你找到所需控件的方法。\n\n- `print_control_identifiers`\n- `draw_outline`\n\n\n\n"
  },
  {
    "path": "What is pywinauto.md",
    "content": "# PYWINAUTO入门指南\n\n[TOC]\n\n> windows上支持的辅助技术列表\n>\n> - Win32 API(`backend = \"win32\"`)(现在默认)\n>   - MFC VB6 VCL\n> - MS UI Automation(`backend = \"uia\"`)\n>   - WinForms, WPF, Store app, QT, Browsers\n>\n> GUI观察\n>\n> - spy++\n>\n> - Inspect.exe\n>\n>   路径在`C:\\Program Files (x86)\\Windows Kits\\<winver>\\bin\\x64`\n>\n>   ​\n>\n>   如果GUI不能满足你的要求，那使用鼠标和键盘模块也是另一种选择，使用[pyautogui](https://github.com/asweigart/pyautogui)吧，它可以满足你任何要求。\n\n\n\n\n\n\n\n###  自动化入口\n\n在`pywinauto`中启动程序使用一个`Application`对象来调用它。\n\n```python\nfrom pywinauto.application import Application\n# 对于Windows中自带应用程序，直接执行，对于外部应用应输入完整路径\napp = Application(backend=\"uia\").start('notepad.exe') \n\n#描述Notepad.exe进程中的窗口\ndlg_spec = app.UntitledNotepad\n#等待窗口真正打开\nactionable_dlg = dlg_spec.wait('visible')\n```\n\n如果你想跨进程进到另一个程序中，你可以使用`Desktop`对象\n\n```python\nfrom subprocess import Popen\nfrom pywinauto import Desktop\n\nPopen('calc.exe', shell=True)\ndlg = Desktop(backend=\"uia\").Calculator\ndlg.wait('visible')\n```\n\n应用程序和桌面对象都是`backend`特定的，因此无需再使用后台名称了。\n\n\n\n### 窗口规格\n\n这高级`pywinauto GUI`的核心概念，你可以使用它来模数窗口或者控件的更多细节，无论它是否存在或者已经关闭。窗口规范还保留着有关匹配算法、搜索算法，这些信息将用于获取真实的窗口或者控件。\n\n我们开始创建一个窗口规范：\n\n```python\n>>> dlg_spec = app.window(title='Untitled - Notepad')\n# 在中文环境下\n# dlg_spec = app.window(title='无标题 - 记事本')\n\n>>> dlg_spec\n<pywinauto.application.WindowSpecification object at 0x0568B790>\n\n>>> dlg_spec.wrapper_object()\n<pywinauto.controls.win32_controls.DialogWrapper object at 0x05639B70>\n# 中文 <uiawrapper.UIAWrapper - '无标题 - 记事本', Dialog, 3713039978638135481>\n```\n\n通过`warpper_object()`方法可以执行实际窗口的查找，它返回真实的窗口或控件的包装器`ElementNotFoundError`，这个包装器可以通过发送动作或者检索数据来处理窗口控件。\n\n但`python`可以隐藏`wrapper_object()`调用，简化代码，例如：\n\n```python\ndlg_spec.wrapper_object().minimize() # while debugging\ndlg_spec.minimize() # in production\n# 两行代码完全等价\n```\n\n创建窗口还有更多的标准，下面是几个示例：\n\n```python\n# can be multi-level\napp.window(title_re='.* - Notepad$').window(class_name='Edit')\n\n# can combine criteria\ndlg = Desktop(backend=\"uia\").Calculator\ndlg.window(auto_id='num8Button', control_type='Button')\n```\n\n\n\n###魔法解析属性\n\n`Python`通过动态解析对象属性来简化窗口规范，但是属性名和变量名一样有相同规范：无空格，逗号和其他特殊符号。幸运的是,`pywinauto`使用”最佳匹配“算法来查看抵消错别字和小的变化。\n\n```python\napp.UntitledNotepad\n# is equivalent to\napp.window(best_match='UntitledNotepad')\n```\n\n`Unicode`字符和特殊符号的使用可以通过字典中的项目进行访问（尤其对于中文来说，找不到相应的控件就对其进行字典访问）\n\n```python\napp['Untitled - Notepad']\n# is the same as\napp.window(best_match='Untitled - Notepad')\n```\n\n\n\n### 如何得到魔法属性名称\n\n有几个原则，如何将“最佳匹配“到的金光闪闪的名称附加到控件上。所以如果窗口规范接近于其中一个名称，那你就能成功匹配。\n\n1. 根据标题（窗口文字，名称）:`app.Properties.OK.click()`\n2. 按标题和控制类型：`app.Properties.OKButton.click()`\n3. 通过控制类型和数量：`app.Properties.Button3.click()`(Button和Button1匹配相同按钮，button2匹配下一个按钮)\n4. 通过左上角的标签和控件类型：`app.OpenDialog.FileNameEdit.set_text(\"\")`\n5. 按控件类型和项目文本：`app.Properties.TabControlSharing.select(\"General\")`\n\n通常这些所有匹配的名称并非都可以同时使用。要检查指定对话框的这些名称，可以使用`print_control_identifiers()`方法。可用的最佳匹配名显示为树中每个控件的Python列表。更详细的窗口规范也可以从方法输出中复制。\n\n例如：\n\n`app.Properties.child_window(title=\"Contains:\", auto_id=\"13087\", control_type=\"Edit\")`\n\n```python\nfrom pywinauto.application import Application\napp = Application(backend=\"uia\").start('notepad.exe')\n# 查到这个记事本的控件树\ndlg_spec = app['无标题 - 记事本']\ndlg_spec.print_control_identifiers()\n\n\n\n\nDialog - '无标题 - 记事本'    (L403, T241, R1203, B609)\n['Dialog', '无标题 - 记事本Dialog', '无标题 - 记事本']\nchild_window(title=\"无标题 - 记事本\", control_type=\"Window\")\n   | \n   | Edit - '文本编辑器'    (L411, T292, R1195, B601)\n   | ['', 'Edit', '0', '1']\n   | child_window(title=\"文本编辑器\", auto_id=\"15\", control_type=\"Edit\")\n   |    | \n   |    | ScrollBar - '垂直滚动条'    (L1178, T292, R1195, B601)\n   |    | ['垂直滚动条', '垂直滚动条ScrollBar', 'ScrollBar']\n   |    | child_window(title=\"垂直滚动条\", auto_id=\"NonClientVerticalScrollBar\", control_type=\"ScrollBar\")\n   |    |    | \n   |    |    | Button - '上一行'    (L1178, T292, R1195, B309)\n   |    |    | ['Button', '上一行', '上一行Button', 'Button0', 'Button1']\n   |    |    | child_window(title=\"上一行\", auto_id=\"UpButton\", control_type=\"Button\")\n   |    |    | \n   |    |    | Button - '下一行'    (L1178, T584, R1195, B601)\n   |    |    | ['Button2', '下一行Button', '下一行']\n   |    |    | child_window(title=\"下一行\", auto_id=\"DownButton\", control_type=\"Button\")\n   | \n   | TitleBar - 'None'    (L427, T244, R1195, B272)\n   | ['2', 'TitleBar']\n   |    | \n   |    | Menu - '系统'    (L411, T249, R433, B271)\n   |    | ['Menu', '系统', '系统Menu', '系统0', '系统1', 'Menu0', 'Menu1']\n   |    | child_window(title=\"系统\", auto_id=\"MenuBar\", control_type=\"MenuBar\")\n   |    |    | \n   |    |    | MenuItem - '系统'    (L411, T249, R433, B271)\n   |    |    | ['系统2', '系统MenuItem', 'MenuItem', 'MenuItem0', 'MenuItem1']\n   |    |    | child_window(title=\"系统\", control_type=\"MenuItem\")\n   |    | \n   |    | Button - '最小化'    (L1056, T242, R1103, B272)\n   |    | ['Button3', '最小化', '最小化Button']\n   |    | child_window(title=\"最小化\", control_type=\"Button\")\n   |    | \n   |    | Button - '最大化'    (L1103, T242, R1149, B272)\n   |    | ['Button4', '最大化Button', '最大化']\n   |    | child_window(title=\"最大化\", control_type=\"Button\")\n   |    | \n   |    | Button - '关闭'    (L1149, T242, R1196, B272)\n   |    | ['Button5', '关闭Button', '关闭']\n   |    | child_window(title=\"关闭\", control_type=\"Button\")\n   | \n   | Menu - '应用程序'    (L411, T272, R1195, B291)\n   | ['应用程序', 'Menu2', '应用程序Menu']\n   | child_window(title=\"应用程序\", auto_id=\"MenuBar\", control_type=\"MenuBar\")\n   |    | \n   |    | MenuItem - '文件(F)'    (L411, T272, R463, B291)\n   |    | ['文件(F)MenuItem', '文件(F)', 'MenuItem2']\n   |    | child_window(title=\"文件(F)\", control_type=\"MenuItem\")\n   |    | \n   |    | MenuItem - '编辑(E)'    (L463, T272, R516, B291)\n   |    | ['编辑(E)MenuItem', '编辑(E)', 'MenuItem3']\n   |    | child_window(title=\"编辑(E)\", control_type=\"MenuItem\")\n   |    | \n   |    | MenuItem - '格式(O)'    (L516, T272, R572, B291)\n   |    | ['格式(O)MenuItem', '格式(O)', 'MenuItem4']\n   |    | child_window(title=\"格式(O)\", control_type=\"MenuItem\")\n   |    | \n   |    | MenuItem - '查看(V)'    (L572, T272, R626, B291)\n   |    | ['查看(V)', '查看(V)MenuItem', 'MenuItem5']\n   |    | child_window(title=\"查看(V)\", control_type=\"MenuItem\")\n   |    | \n   |    | MenuItem - '帮助(H)'    (L626, T272, R681, B291)\n   |    | ['帮助(H)', '帮助(H)MenuItem', 'MenuItem6']\n   |    | child_window(title=\"帮助(H)\", control_type=\"MenuItem\")\n\nProcess finished with exit code 0\n\n```\n\n\n\n###  一些例子\n\n下面的这些例子所包括：注意：示例是依赖于语言的，他们仅适用于所coding的产品语言，如下所示例的均为英文环境。\n\n- `mspaint.py` 控制`MSPaint`\n- `notepad_fast.py` 使用快速时间设置来控制笔记本\n- `notepad_slow.py` 使用慢时间设置来控制笔记本\n- `notepad_item.py` 使用项目，然后属性访问控件记事本。\n- `misc_examples.py` 显示一些异常以及如何获取控制标识符。\n- `save_from_internet_explorer.py` 从Internet Explorer保存网页。\n- `save_from_firefox.py` 从Firefox保存网页。\n- `get_winrar_info.py` 如何做多语言自动化的例子。这不是一个理想的例子（适用于法语，捷克语和德语WinRar）\n- `forte_agent_sample.py` 处理复杂的应用程序的例子是非常动态的，并且在启动时经常给出不同的对话框。\n- `windowmediaplayer.py` 另一个例子 - 处理ListView中的复选框。\n- `test_sakura.py`，`test_sakura2.py` 自动化一个Japanase产品的两个例子。\n\n\n\n### 在命令行自动化记事本\n\n请按照如下示例运行\n\n```python\nfrom pywinauto.application import Application\nimport time\n\napp = Application().start('notepad.exe')\ntime.sleep(1)\napp[' 无标题 - 记事本 '].menu_select(\"编辑(&E) -> 替换(&R)..\")\ntime.sleep(1)\napp['替换'].取消.click()\n\n# 没有with_spaces 参数空格将不会被键入。请参阅SendKeys的这个方法的文档，因为它是SendKeys周围的薄包装。\napp[' 无标题 - 记事本 '].Edit.type_keys(\"Hi from Python interactive prompt %s\" % str(dir()), with_spaces = True)\n\napp[' 无标题 - 记事本 '].menu_select('文件(&F) -> 退出(&X)')\n\n# 在这时候不清楚“不保存”的按钮名就对app['记事本'] 使用print_control_identifiers()\napp['记事本'].Button2.click()\n```\n\n"
  }
]