class ListControl(Control)类。列表控件(控件)
| ListControl(searchFromControl: uiautomation.uiautomation.Control = None,
列表控件(从控件搜索:UI自动化。UI自动化。控件=空值
searchDepth: int = 4294967295, searchInterval: float = 0.5, foundIndex: int = 1,
搜索深度:整数 = 4294967295,搜索间隔:浮点数 = 0.5,找到的索引:整数=1,
element=None, **searchProperties)
**元素节点 = 空值,搜索属性)
|
| Method resolution order:方法解析顺序
| ListControl 列表控件
| Control 列表
| builtins.object 内置对象
|
| Methods defined here: 在这里定义的方法
|
| GetGridPattern(self) -> uiautomation.uiautomation.GridPattern
获取网格模式(参数)->UI自动化。UI自动化。网格模式
| Return GridPattern
if it supports the pattern else None(Conditional support
回程 网格模式 如果(某个对象)支持这种模式,则返回该模式相关的内容或对象;如果不支持,则返回 None
according to MSDN).(根据MSDN的条件支持)
|
| GetMultipleViewPattern(self) -> uiautomation.uiautomation.MultipleViewPattern
| Return MultipleViewPattern
if it supports the pattern else None(Conditional support according to MSDN).
获取多视图模式(参数)-> UI自动化。UI自动化。多视图模式
检查某个对象是否支持 MultipleViewPattern(多视图模式),如果支持,则返回与该模式相关的对象;如果不支持(基于Microsoft Developer Network文档中所述的条件支持原则),则返回None
|
| GetScrollPattern(self) -> uiautomation.uiautomation.ScrollPattern
| Return ScrollPattern
if it supports the pattern else None(Conditional support according to MSDN).
获取滚动模式(方法)(当调用时) -> 返回UIAutomation库中的ScrollPattern对象
检查某个UI元素是否支持滚动模式。如果该元素确实支持 ScrollPattern(即具有滚动功能),则方法会返回一个与该滚动模式相关的对象;若不支持,则根据Microsoft Developer Network文档中的条件支持说明,该方法将返回None值。
|
| GetSelectionPattern(self) -> uiautomation.uiautomation.SelectionPattern
| Return SelectionPattern
if it supports the pattern else None(Conditional support according to MSDN).
获取选择模式(方法)(当调用时) -> 返回UIAutomation库中的SelectionPattern对象。
如果支持该模式则返回 SelectionPattern,否则(基于MSDN中所述的条件支持原则)返回 None。
|
| init(self, searchFromControl: uiautomation.uiautomation.Control = None, searchDepth: int = 4294967295, searchInterval: float = 0.5, foundIndex: int = 1, element=None, *searchProperties)
初始化(参数,搜索起始点的UI元素:UI自动化.UI自动化.控件 = 空值,搜索深度:整数 = 4294967295, 延时等待或定时搜索:浮点数 = 0.5,指定找到匹配条件的第几个元素:整数 = 1, 用于直接指定要操作的对象 = 空值, 用于搜索UI元素的一系列属性及其对应的值。)
| searchFromControl: Control
or its subclass, if it is None, search from root control(Desktop).
参数 searchFromControl 需要传入一个 Control 类型的对象或者它的某个子类对象。当这个参数被设置为 None 时,搜索将从根控件,即桌面(Desktop)开始进行。
| searchDepth: int, max search depth from searchFromControl.
参数 searchDepth 是一个整数值类型,它定义了在执行搜索时,从 searchFromControl 指定的控件开始向下遍历 UI 元素树的最大层级。
| foundIndex: int, starts with 1, >= 1.
参数 foundIndex 是一个整数,它的初始值应该是1,并且要求其值至少为1。这个参数可能用于指定在搜索过程中找到并返回第几个匹配条件的元素。
| searchInterval: float, wait searchInterval after every search in self.Refind and self.Exists, the global timeout is TIME_OUT_SECOND.
参数 searchInterval 是一个浮点数,它表示在调用 self.Refind 或 self.Exists 这两个方法进行搜索操作时,每执行一次搜索之后会暂停等待 searchInterval 指定的秒数。同时指出整个搜索过程有一个全局的超时时间,该超时时间为 TIME_OUT_SECOND。
| element: ctypes.POINTER(IUIAutomationElement)
, internal use only.
| searchProperties: defines how to search, the following keys can be used:
| ControlType: int, a value in class ControlType
.
| ClassName: str.
| AutomationId: str.
| Name: str.
| SubName: str, a part str in Name.
| RegexName: str, supports regex using re.match.
| You can only use one of Name, SubName, RegexName in searchProperties.
| Depth: int, only search controls in relative depth from searchFromControl, ignore controls in depth(0~Depth-1),
| if set, searchDepth will be set to Depth too.
| Compare: Callable[[Control, int], bool], custom compare function(control: Control, depth: int) -> bool.
|
| Control
wraps IUIAutomationElement.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nn-uiautomationclient-iuiautomationelement
|
| ----------------------------------------------------------------------
| Methods inherited from Control:
|
| AddSearchProperties(self, **searchProperties) -> None
| Add search properties using dict.update
.
| searchProperties: dict, same as searchProperties in Control.__init__
.
|
| ButtonControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ButtonControl’
|
| CalendarControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘CalendarControl’
|
| CaptureToImage(self, savePath: str, x: int = 0, y: int = 0, width: int = 0, height: int = 0) -> bool
| Capture control to a image file.
| savePath: str, should end with .bmp, .jpg, .jpeg, .png, .gif, .tif, .tiff.
| x, y: int, the point in control’s internal position(from 0,0).
| width, height: int, image’s width and height from x, y, use 0 for entire area.
| If width(or height) < 0, image size will be control’s width(or height) - width(or height).
| Return bool, True if succeed otherwise False.
|
| CheckBoxControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘CheckBoxControl’
|
| Click(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, simulateMove: bool = True, waitTime: float = 0.5) -> None
| x: int, if < 0, click self.BoundingRectangle.right + x, if not None, ignore ratioX.
| y: int, if < 0, click self.BoundingRectangle.bottom + y, if not None, ignore ratioY.
| ratioX: float.
| ratioY: float.
| simulateMove: bool, if True, first move cursor to control smoothly.
| waitTime: float.
|
| Click(), Click(ratioX=0.5, ratioY=0.5): click center.
| Click(10, 10): click left+10, top+10.
| Click(-10, -10): click right-10, bottom-10.
|
| ComboBoxControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ComboBoxControl’
|
| Control(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘Control’
|
| CustomControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘CustomControl’
|
| DataGridControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘DataGridControl’
|
| DataItemControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘DataItemControl’
|
| Disappears(self, maxSearchSeconds: float = 5, searchIntervalSeconds: float = 0.5, printIfNotDisappear: bool = False) -> bool
| maxSearchSeconds: float
| searchIntervalSeconds: float
| Check if control disappears every searchIntervalSeconds seconds in maxSearchSeconds seconds.
| Return bool, True if control disappears.
|
| DocumentControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘DocumentControl’
|
| DoubleClick(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, simulateMove: bool = True, waitTime: float = 0.5) -> None
| x: int, if < 0, right click self.BoundingRectangle.right + x, if not None, ignore ratioX.
| y: int, if < 0, right click self.BoundingRectangle.bottom + y, if not None, ignore ratioY.
| ratioX: float.
| ratioY: float.
| simulateMove: bool, if True, first move cursor to control smoothly.
| waitTime: float.
|
| DoubleClick(), DoubleClick(ratioX=0.5, ratioY=0.5): double click center.
| DoubleClick(10, 10): double click left+10, top+10.
| DoubleClick(-10, -10): double click right-10, bottom-10.
|
| DragDrop(self, x1: int, y1: int, x2: int, y2: int, moveSpeed: float = 1, waitTime: float = 0.5) -> None
|
| EditControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘EditControl’
|
| Exists(self, maxSearchSeconds: float = 5, searchIntervalSeconds: float = 0.5, printIfNotExist: bool = False) -> bool
| maxSearchSeconds: float
| searchIntervalSeconds: float
| Find control every searchIntervalSeconds seconds in maxSearchSeconds seconds.
| Return bool, True if find
|
| GetAncestorControl(self, condition: Callable[[ForwardRef(‘Control’), int], bool]) -> ‘Control’
| Get an ancestor control that matches the condition.
| condition: Callable[[Control, int], bool], function(control: Control, depth: int) -> bool,
| depth starts with -1 and decreses when search goes up.
| Return Control
subclass or None.
|
| GetCachedPattern(self, patternId: int, cache: bool)
| Get a pattern by patternId.
| patternId: int, a value in class PatternId
.
| Return a pattern if it supports the pattern else None.
| cache: bool, if True, store the pattern for later use, if False, get a new pattern by self.GetPattern
.
|
| GetChildren(self) -> List[ForwardRef(‘Control’)]
| Return List[Control], a list of Control
subclasses.
|
| GetClickablePoint(self) -> Tuple[int, int, bool]
| Call IUIAutomationElement::GetClickablePoint.
| Return Tuple[int, int, bool], three items tuple (x, y, gotClickable), such as (20, 10, True)
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getclickablepoint
|
| GetColorfulSearchPropertiesStr(self, keyColor=‘DarkGreen’, valueColor=‘DarkCyan’) -> str
| keyColor, valueColor: str, color name in class ConsoleColor
|
| GetFirstChildControl(self) -> ‘Control’
| Return Control
subclass or None.
|
| GetLastChildControl(self) -> ‘Control’
| Return Control
subclass or None.
|
| GetLegacyIAccessiblePattern(self) -> uiautomation.uiautomation.LegacyIAccessiblePattern
| Return LegacyIAccessiblePattern
if it supports the pattern else None.
|
| GetNextSiblingControl(self) -> ‘Control’
| Return Control
subclass or None.
|
| GetParentControl(self) -> ‘Control’
| Return Control
subclass or None.
|
| GetPattern(self, patternId: int)
| Call IUIAutomationElement::GetCurrentPattern.
| Get a new pattern by pattern id if it supports the pattern.
| patternId: int, a value in class PatternId
.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getcurrentpattern
|
| GetPatternAs(self, patternId: int, riid)
| Call IUIAutomationElement::GetCurrentPatternAs.
| Get a new pattern by pattern id if it supports the pattern, todo.
| patternId: int, a value in class PatternId
.
| riid: GUID.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getcurrentpatternas
|
| GetPixelColor(self, x: int, y: int) -> int
| Call native GetPixelColor
if control has a valid native handle.
| Use self.ToBitmap
if control doesn’t have a valid native handle or you get many pixels.
| x: int, internal x position.
| y: int, internal y position.
| Return int, a color value in bgr.
| r = bgr & 0x0000FF
| g = (bgr & 0x00FF00) >> 8
| b = (bgr & 0xFF0000) >> 16
|
| GetPosition(self, ratioX: float = 0.5, ratioY: float = 0.5) -> Tuple[int, int]
| Gets the position of the center of the control.
| ratioX: float.
| ratioY: float.
| Return Tuple[int, int], two ints tuple (x, y), the cursor positon relative to screen(0, 0)
|
| GetPreviousSiblingControl(self) -> ‘Control’
| Return Control
subclass or None.
|
| GetPropertyValue(self, propertyId: int) -> Any
| Call IUIAutomationElement::GetCurrentPropertyValue.
| propertyId: int, a value in class PropertyId
.
| Return Any, corresponding type according to propertyId.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getcurrentpropertyvalue
|
| GetPropertyValueEx(self, propertyId: int, ignoreDefaultValue: int) -> Any
| Call IUIAutomationElement::GetCurrentPropertyValueEx.
| propertyId: int, a value in class PropertyId
.
| ignoreDefaultValue: int, 0 or 1.
| Return Any, corresponding type according to propertyId.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getcurrentpropertyvalueex
|
| GetRuntimeId(self) -> List[int]
| Call IUIAutomationElement::GetRuntimeId.
| Return List[int], a list of int.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getruntimeid
|
| GetSearchPropertiesStr(self) -> str
|
| GetSiblingControl(self, condition: Callable[[ForwardRef(‘Control’)], bool], forward: bool = True) -> ‘Control’
| Get a sibling control that matches the condition.
| forward: bool, if True, only search next siblings, if False, search pervious siblings first, then search next siblings.
| condition: Callable[[Control], bool], function(control: Control) -> bool.
| Return Control
subclass or None.
|
| GetTopLevelControl(self) -> ‘Control’
| Get the top level control which current control lays.
| If current control is top level, return self.
| If current control is root control, return None.
| Return PaneControl
or WindowControl
or None.
|
| GetWindowText(self) -> str
| Call native GetWindowText if control has a valid native handle.
|
| GroupControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘GroupControl’
|
| HeaderControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘HeaderControl’
|
| HeaderItemControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘HeaderItemControl’
|
| Hide(self, waitTime: float = 0.5) -> bool
| Call native ShowWindow(SW.Hide)
.
| waitTime: float
| Return bool, True if succeed otherwise False.
|
| HyperlinkControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘HyperlinkControl’
|
| ImageControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ImageControl’
|
| IsTopLevel(self) -> bool
| Determine whether current control is top level.
|
| ListControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ListControl’
|
| ListItemControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ListItemControl’
|
| MenuBarControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘MenuBarControl’
|
| MenuControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘MenuControl’
|
| MenuItemControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘MenuItemControl’
|
| MiddleClick(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, simulateMove: bool = True, waitTime: float = 0.5) -> None
| x: int, if < 0, middle click self.BoundingRectangle.right + x, if not None, ignore ratioX.
| y: int, if < 0, middle click self.BoundingRectangle.bottom + y, if not None, ignore ratioY.
| ratioX: float.
| ratioY: float.
| simulateMove: bool, if True, first move cursor to control smoothly.
| waitTime: float.
|
| MiddleClick(), MiddleClick(ratioX=0.5, ratioY=0.5): middle click center.
| MiddleClick(10, 10): middle click left+10, top+10.
| MiddleClick(-10, -10): middle click right-10, bottom-10.
|
| MoveCursorToInnerPos(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, simulateMove: bool = True) -> Tuple[int, int]
| Move cursor to control’s internal position, default to center.
| x: int, if < 0, move to self.BoundingRectangle.right + x, if not None, ignore ratioX.
| y: int, if < 0, move to self.BoundingRectangle.bottom + y, if not None, ignore ratioY.
| ratioX: float.
| ratioY: float.
| simulateMove: bool.
| Return Tuple[int, int], two ints tuple (x, y), the cursor positon relative to screen(0, 0)
| after moving or None if control’s width or height is 0.
|
| MoveCursorToMyCenter(self, simulateMove: bool = True) -> Tuple[int, int]
| Move cursor to control’s center.
| Return Tuple[int, int], two ints tuple (x, y), the cursor positon relative to screen(0, 0) after moving.
|
| MoveWindow(self, x: int, y: int, width: int, height: int, repaint: bool = True) -> bool
| Call native MoveWindow if control has a valid native handle.
| x: int.
| y: int.
| width: int.
| height: int.
| repaint: bool.
| Return bool, True if succeed otherwise False.
|
| PaneControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘PaneControl’
|
| ProgressBarControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ProgressBarControl’
|
| RadioButtonControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘RadioButtonControl’
|
| Refind(self, maxSearchSeconds: float = 10, searchIntervalSeconds: float = 0.5, raiseException: bool = True) -> bool
| Refind the control every searchIntervalSeconds seconds in maxSearchSeconds seconds.
| maxSearchSeconds: float.
| searchIntervalSeconds: float.
| raiseException: bool, if True, raise a LookupError if timeout.
| Return bool, True if find.
|
| RemoveSearchProperties(self, **searchProperties) -> None
| searchProperties: dict, same as searchProperties in Control.__init__
.
|
| RightClick(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, simulateMove: bool = True, waitTime: float = 0.5) -> None
| x: int, if < 0, right click self.BoundingRectangle.right + x, if not None, ignore ratioX.
| y: int, if < 0, right click self.BoundingRectangle.bottom + y, if not None, ignore ratioY.
| ratioX: float.
| ratioY: float.
| simulateMove: bool, if True, first move cursor to control smoothly.
| waitTime: float.
|
| RightClick(), RightClick(ratioX=0.5, ratioY=0.5): right click center.
| RightClick(10, 10): right click left+10, top+10.
| RightClick(-10, -10): right click right-10, bottom-10.
|
| RightDragDrop(self, x1: int, y1: int, x2: int, y2: int, moveSpeed: float = 1, waitTime: float = 0.5) -> None
|
| ScrollBarControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ScrollBarControl’
|
| SemanticZoomControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘SemanticZoomControl’
|
| SendKey(self, key: int, waitTime: float = 0.5) -> None
| Make control have focus first and type a key.
| self.SetFocus
may not work for some controls, you may need to click it to make it have focus.
| key: int, a key code value in class Keys.
| waitTime: float.
|
| SendKeys(self, text: str, interval: float = 0.01, waitTime: float = 0.5, charMode: bool = True) -> None
| Make control have focus first and type keys.
| self.SetFocus
may not work for some controls, you may need to click it to make it have focus.
| text: str, keys to type, see the docstring of SendKeys
.
| interval: float, seconds between keys.
| waitTime: float.
| charMode: bool, if False, the text typied is depend on the input method if a input method is on.
|
| SeparatorControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘SeparatorControl’
|
| SetFocus(self) -> bool
| Call IUIAutomationElement::SetFocus.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-setfocus
|
| SetSearchDepth(self, searchDepth: int) -> None
|
| SetSearchFromControl(self, searchFromControl: ‘Control’) -> None
| searchFromControl: Control
or its subclass
|
| SetWindowText(self, text: str) -> bool
| Call native SetWindowText if control has a valid native handle.
|
| Show(self, waitTime: float = 0.5) -> bool
| Call native ShowWindow(SW.Show)
.
| Return bool, True if succeed otherwise False.
|
| ShowWindow(self, cmdShow: int, waitTime: float = 0.5) -> bool
| Get a native handle from self or ancestors until valid and call native ShowWindow
with cmdShow.
| cmdShow: int, a value in in class SW
.
| waitTime: float.
| Return bool, True if succeed otherwise False.
|
| SliderControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘SliderControl’
|
| SpinnerControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘SpinnerControl’
|
| SplitButtonControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘SplitButtonControl’
|
| StatusBarControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘StatusBarControl’
|
| TabControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘TabControl’
|
| TabItemControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘TabItemControl’
|
| TableControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘TableControl’
|
| TextControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘TextControl’
|
| ThumbControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ThumbControl’
|
| TitleBarControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘TitleBarControl’
|
| ToBitmap(self, x: int = 0, y: int = 0, width: int = 0, height: int = 0) -> uiautomation.uiautomation.Bitmap
| Capture control to a Bitmap
object.
| x, y: int, the point in control’s internal position(from 0,0).
| width, height: int, image’s width and height from x, y, use 0 for entire area.
| If width(or height) < 0, image size will be control’s width(or height) - width(or height).
|
| ToolBarControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ToolBarControl’
|
| ToolTipControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘ToolTipControl’
|
| TreeControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘TreeControl’
|
| TreeItemControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘TreeItemControl’
|
| WheelDown(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, wheelTimes: int = 1, interval: float = 0.05, waitTime: float = 0.5) -> None
| Make control have focus first, move cursor to the specified position and mouse wheel down.
| x: int, if < 0, move x cursor to self.BoundingRectangle.right + x, if not None, ignore ratioX.
| y: int, if < 0, move y cursor to self.BoundingRectangle.bottom + y, if not None, ignore ratioY.
| ratioX: float.
| ratioY: float.
| wheelTimes: int.
| interval: float.
| waitTime: float.
|
| WheelUp(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, wheelTimes: int = 1, interval: float = 0.05, waitTime: float = 0.5) -> None
| Make control have focus first, move cursor to the specified position and mouse wheel up.
| x: int, if < 0, move x cursor to self.BoundingRectangle.right + x, if not None, ignore ratioX.
| y: int, if < 0, move y cursor to self.BoundingRectangle.bottom + y, if not None, ignore ratioY.
| ratioX: float.
| ratioY: float.
| wheelTimes: int.
| interval: float.
| waitTime: float.
|
| WindowControl(self, searchDepth=4294967295, searchInterval=0.5, foundIndex=1, element=0, **searchProperties) -> ‘WindowControl’
|
| str(self) -> str
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from Control:
|
| CreateControlFromControl(control: ‘Control’) -> ‘Control’
| Create a concreate Control
from a control instance, copy it.
| control: Control
or its subclass.
| Return a subclass of Control
, an instance of the control’s real type.
| For example: if control’s ControlType is EditControl, return an EditControl.
|
| CreateControlFromElement(element) -> ‘Control’
| Create a concreate Control
from a com type IUIAutomationElement
.
| element: ctypes.POINTER(IUIAutomationElement)
.
| Return a subclass of Control
, an instance of the control’s real type.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from Control:
|
| AcceleratorKey
| Property AcceleratorKey.
| Call IUIAutomationElement::get_CurrentAcceleratorKey.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentacceleratorkey
|
| AccessKey
| Property AccessKey.
| Call IUIAutomationElement::get_CurrentAccessKey.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentaccesskey
|
| AriaProperties
| Property AriaProperties.
| Call IUIAutomationElement::get_CurrentAriaProperties.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentariaproperties
|
| AriaRole
| Property AriaRole.
| Call IUIAutomationElement::get_CurrentAriaRole.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentariarole
|
| AutomationId
| Property AutomationId.
| Call IUIAutomationElement::get_CurrentAutomationId.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentautomationid
|
| BoundingRectangle
| Property BoundingRectangle.
| Call IUIAutomationElement::get_CurrentBoundingRectangle.
| Return Rect
.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentboundingrectangle
|
| rect = control.BoundingRectangle
| print(rect.left, rect.top, rect.right, rect.bottom, rect.width(), rect.height(), rect.xcenter(), rect.ycenter())
|
| ClassName
| Property ClassName.
| Call IUIAutomationElement::get_CurrentClassName.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentclassname
|
| ControlType
| Property ControlType.
| Return int, a value in class ControlType
.
| Call IUIAutomationElement::get_CurrentControlType.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentcontroltype
|
| ControlTypeName
| Property ControlTypeName.
|
| Culture
| Property Culture.
| Call IUIAutomationElement::get_CurrentCulture.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentculture
|
| Element
| Property Element.
| Return ctypes.POINTER(IUIAutomationElement)
.
|
| FrameworkId
| Property FrameworkId.
| Call IUIAutomationElement::get_CurrentFrameworkId.
| Return str, such as Win32, WPF…
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentframeworkid
|
| HasKeyboardFocus
| Property HasKeyboardFocus.
| Call IUIAutomationElement::get_CurrentHasKeyboardFocus.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currenthaskeyboardfocus
|
| HelpText
| Property HelpText.
| Call IUIAutomationElement::get_CurrentHelpText.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currenthelptext
|
| IsContentElement
| Property IsContentElement.
| Call IUIAutomationElement::get_CurrentIsContentElement.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentiscontentelement
|
| IsControlElement
| Property IsControlElement.
| Call IUIAutomationElement::get_CurrentIsControlElement.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentiscontrolelement
|
| IsDataValidForForm
| Property IsDataValidForForm.
| Call IUIAutomationElement::get_CurrentIsDataValidForForm.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentisdatavalidforform
|
| IsEnabled
| Property IsEnabled.
| Call IUIAutomationElement::get_CurrentIsEnabled.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentisenabled
|
| IsKeyboardFocusable
| Property IsKeyboardFocusable.
| Call IUIAutomationElement::get_CurrentIsKeyboardFocusable.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentiskeyboardfocusable
|
| IsOffscreen
| Property IsOffscreen.
| Call IUIAutomationElement::get_CurrentIsOffscreen.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentisoffscreen
|
| IsPassword
| Property IsPassword.
| Call IUIAutomationElement::get_CurrentIsPassword.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentispassword
|
| IsRequiredForForm
| Property IsRequiredForForm.
| Call IUIAutomationElement::get_CurrentIsRequiredForForm.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentisrequiredforform
|
| ItemStatus
| Property ItemStatus.
| Call IUIAutomationElement::get_CurrentItemStatus.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentitemstatus
|
| ItemType
| Property ItemType.
| Call IUIAutomationElement::get_CurrentItemType.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentitemtype
|
| LocalizedControlType
| Property LocalizedControlType.
| Call IUIAutomationElement::get_CurrentLocalizedControlType.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentlocalizedcontroltype
|
| Name
| Property Name.
| Call IUIAutomationElement::get_CurrentName.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentname
|
| NativeWindowHandle
| Property NativeWindowHandle.
| Call IUIAutomationElement::get_CurrentNativeWindowHandle.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentnativewindowhandle
|
| Orientation
| Property Orientation.
| Return int, a value in class OrientationType
.
| Call IUIAutomationElement::get_CurrentOrientation.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentorientation
|
| ProcessId
| Property ProcessId.
| Call IUIAutomationElement::get_CurrentProcessId.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentprocessid
|
| ProviderDescription
| Property ProviderDescription.
| Call IUIAutomationElement::get_CurrentProviderDescription.
| Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentproviderdescription
|
| ----------------------------------------------------------------------
| Data descriptors inherited from Control:
|
| dict
| dictionary for instance variables (if defined)
|
| weakref
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from Control:
|
| ValidKeys = {‘AutomationId’, ‘ClassName’, ‘Compare’, ‘ControlType’, 'D…文章来源地址https://www.toymoban.com/news/detail-806292.html
文章来源:https://www.toymoban.com/news/detail-806292.html
到了这里,关于2.关于 uiautomation.uiautomation 模块中 ListControl (列表控件)类的帮助信息的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!