简体   繁体   English

如何自动化第三方UI控件

[英]How to automate third-party UI control

I'm trying to extracting data from third-party software. 我正在尝试从第三方软件中提取数据。 The window has a customised tab control (not the standard one) which contains multi SysTreeView32 in tabs. 该窗口具有自定义选项卡控件(不是标准选项卡),其中包含选项卡中的多个SysTreeView32。

The software has different versions and each version has different set of tabs. 该软件具有不同的版本,每个版本都有不同的选项卡集。

Both Inspect.exe and Spy++ only show the control itself without any information about the tab children. Inspect.exe和Spy ++都只显示控件本身,而不显示有关选项卡子项的任何信息。

Do you know how to programmatically select the specific tab by its title? 您知道如何以编程方式按标题选择特定选项卡吗?

Here's the information of the 3rd-party control from Inspect.exe 以下是Inspect.exe的第三方控件的信息

How found:                            Mouse move (292,346)
                                      hwnd=0x005203F6 32bit class="Afx:5080000:0:10003:0:0" style=0x56000000 ex=0x0
Name:                                 ""
ControlType:                          UIA_PaneControlTypeId (0xC371)
LocalizedControlType:                 "窗格"
BoundingRectangle:                    {l:98 t:327 r:410 b:1014}
IsEnabled:                            true
IsOffscreen:                          false
IsKeyboardFocusable:                  true
HasKeyboardFocus:                     false
AccessKey:                            ""
ProcessId:                            36076
RuntimeId:                            [2A.5203F6]
AutomationId:                         "221"
FrameworkId:                          "Win32"
ClassName:                            "Afx:5080000:0:10003:0:0"
NativeWindowHandle:                   0x5203F6
ProviderDescription:                  "[pid:41692,hwnd:0x5203F6 Main:Nested [pid:36076,hwnd:0x5203F6 Annotation(parent link):Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main:Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]"
IsPassword:                           false
HelpText:                             ""
LegacyIAccessible.ChildId:            0
LegacyIAccessible.DefaultAction:      ""
LegacyIAccessible.Description:        ""
LegacyIAccessible.Help:               ""
LegacyIAccessible.KeyboardShortcut:   ""
LegacyIAccessible.Name:               ""
LegacyIAccessible.Role:               客户端 (0xA)
LegacyIAccessible.State:              可设定焦点 (0x100000)
LegacyIAccessible.Value:              ""
IsAnnotationPatternAvailable:         false
IsDragPatternAvailable:               false
IsDockPatternAvailable:               false
IsDropTargetPatternAvailable:         false
IsExpandCollapsePatternAvailable:     false
IsGridItemPatternAvailable:           false
IsGridPatternAvailable:               false
IsInvokePatternAvailable:             false
IsItemContainerPatternAvailable:      false
IsLegacyIAccessiblePatternAvailable:  true
IsMultipleViewPatternAvailable:       false
IsObjectModelPatternAvailable:        false
IsRangeValuePatternAvailable:         false
IsScrollItemPatternAvailable:         false
IsScrollPatternAvailable:             false
IsSelectionItemPatternAvailable:      false
IsSelectionPatternAvailable:          false
IsSpreadsheetItemPatternAvailable:    false
IsSpreadsheetPatternAvailable:        false
IsStylesPatternAvailable:             false
IsSynchronizedInputPatternAvailable:  false
IsTableItemPatternAvailable:          false
IsTablePatternAvailable:              false
IsTextChildPatternAvailable:          false
IsTextEditPatternAvailable:           false
IsTextPatternAvailable:               false
IsTextPattern2Available:              false
IsTogglePatternAvailable:             false
IsTransformPatternAvailable:          false
IsTransform2PatternAvailable:         false
IsValuePatternAvailable:              false
IsVirtualizedItemPatternAvailable:    false
IsWindowPatternAvailable:             false
FirstChild:                           "" 树
LastChild:                            "" 树
Next:                                 [null]
Previous:                             [null]
Other Props:                          Object has no additional properties
Children:                             "" 树
Ancestors:                            "" 窗格
                                      "" 窗格
                                      "" 窗格
                                      "V6" 对话框
                                      "" 窗格
                                      "" 窗格
                                      "" 容器
                                      "V9.32" 窗口
                                      "桌面" 窗格
                                      [ No Parent ]

If "AutomationId" is unique, can we try to map the logical names with the "AutomationId" & use those fields in automation. 如果“AutomationId”是唯一的,我们可以尝试使用“AutomationId”映射逻辑名称并在自动化中使用这些字段。 I may be wrong, but a possible solution. 我可能错了,但可能是一个解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用SAPI 5控制第三方文本语音转换语音? - How to control third-party text-to-speech voices using SAPI 5? 如何打包UWP app包含第三方dll到appxbundle? - how to package UWP app contains third-party dlls to appxbundle? 有没有办法从VB.NET控制第三方EXE文件? - Is there a way to control a third-party EXE file from VB.NET? 覆盖第三方软件GUI - Overriding third-party software GUI 使用第三方库进行Python部署 - Python deployment with third-party libraries 如何在 MATLAB 打开的情况下使用第三方/命令行 git? - How can I use third-party/command line git with MATLAB open? 如何将第三方Windows DLL组织到应用程序文件夹中的子文件夹中? - How can I organise third-party Windows DLLs into a subfolder in my application folder? 我应该如何在Win32 C ++应用程序中集成和打包此第三方库? - How should I integrate with and package this third-party library in a Win32 C++ app? 如何在WinJS应用程序中使用嵌入式浏览器嵌入第三方网页? - How can I embed a third-party web page using an embedded browser in a WinJS application? 如何确定从Java应用程序访问某些第三方程序和资源的方式? - How can I determine the way to access certain third-party programs and resources from my Java app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM