uiautomation
uiautomation.uiautomation.Control クラス
uiautomation.uiautomation.Control の継承関係図
uiautomation.uiautomation.AppBarControl uiautomation.uiautomation.ButtonControl uiautomation.uiautomation.CalendarControl uiautomation.uiautomation.CheckBoxControl uiautomation.uiautomation.ComboBoxControl uiautomation.uiautomation.CustomControl uiautomation.uiautomation.DataGridControl uiautomation.uiautomation.DataItemControl uiautomation.uiautomation.DocumentControl uiautomation.uiautomation.EditControl uiautomation.uiautomation.GroupControl uiautomation.uiautomation.HeaderControl uiautomation.uiautomation.HeaderItemControl uiautomation.uiautomation.HyperlinkControl uiautomation.uiautomation.ImageControl uiautomation.uiautomation.ListControl uiautomation.uiautomation.ListItemControl uiautomation.uiautomation.MenuBarControl uiautomation.uiautomation.MenuControl uiautomation.uiautomation.MenuItemControl uiautomation.uiautomation.PaneControl uiautomation.uiautomation.ProgressBarControl uiautomation.uiautomation.RadioButtonControl uiautomation.uiautomation.ScrollBarControl uiautomation.uiautomation.SemanticZoomControl uiautomation.uiautomation.SeparatorControl uiautomation.uiautomation.SliderControl uiautomation.uiautomation.SpinnerControl uiautomation.uiautomation.SplitButtonControl uiautomation.uiautomation.StatusBarControl uiautomation.uiautomation.TabControl uiautomation.uiautomation.TabItemControl uiautomation.uiautomation.TableControl uiautomation.uiautomation.TextControl uiautomation.uiautomation.ThumbControl uiautomation.uiautomation.TitleBarControl uiautomation.uiautomation.ToolBarControl uiautomation.uiautomation.ToolTipControl uiautomation.uiautomation.TreeControl uiautomation.uiautomation.TreeItemControl uiautomation.uiautomation.WindowControl

公開メンバ関数

def __init__ (self, 'Control' searchFromControl=None, int searchDepth=0xFFFFFFFF, float searchInterval=SEARCH_INTERVAL, int foundIndex=1, element=None, **searchProperties)
 
str __str__ (self)
 
None SetSearchFromControl (self, 'Control' searchFromControl)
 
None SetSearchDepth (self, int searchDepth)
 
None AddSearchProperties (self, **searchProperties)
 
None RemoveSearchProperties (self, **searchProperties)
 
str GetSearchPropertiesStr (self)
 
str GetColorfulSearchPropertiesStr (self, keyColor='DarkGreen', valueColor='DarkCyan')
 
str AcceleratorKey (self)
 
str AccessKey (self)
 
str AriaProperties (self)
 
str AriaRole (self)
 
str AutomationId (self)
 
Rect BoundingRectangle (self)
 
str ClassName (self)
 
int ControlType (self)
 
int Culture (self)
 
str FrameworkId (self)
 
bool HasKeyboardFocus (self)
 
str HelpText (self)
 
bool IsContentElement (self)
 
bool IsControlElement (self)
 
bool IsDataValidForForm (self)
 
bool IsEnabled (self)
 
bool IsKeyboardFocusable (self)
 
bool IsOffscreen (self)
 
bool IsPassword (self)
 
bool IsRequiredForForm (self)
 
str ItemStatus (self)
 
str ItemType (self)
 
str LocalizedControlType (self)
 
str Name (self)
 
str NativeWindowHandle (self)
 
int Orientation (self)
 
int ProcessId (self)
 
str ProviderDescription (self)
 
Tuple[int, int, bool] GetClickablePoint (self)
 
def GetPattern (self, int patternId)
 
def GetPatternAs (self, int patternId, riid)
 
Any GetPropertyValue (self, int propertyId)
 
Any GetPropertyValueEx (self, int propertyId, int ignoreDefaultValue)
 
List[int] GetRuntimeId (self)
 
bool SetFocus (self)
 
def Element (self)
 
str ControlTypeName (self)
 
def GetCachedPattern (self, int patternId, bool cache)
 
LegacyIAccessiblePattern GetLegacyIAccessiblePattern (self)
 
'ControlGetAncestorControl (self, Callable[['Control', int], bool] condition)
 
'ControlGetParentControl (self)
 
'ControlGetFirstChildControl (self)
 
'ControlGetLastChildControl (self)
 
'ControlGetNextSiblingControl (self)
 
'ControlGetPreviousSiblingControl (self)
 
'ControlGetSiblingControl (self, Callable[['Control'], bool] condition, bool forward=True)
 
List[ 'Control'] GetChildren (self)
 
bool Exists (self, float maxSearchSeconds=5, float searchIntervalSeconds=SEARCH_INTERVAL, bool printIfNotExist=False)
 
bool Disappears (self, float maxSearchSeconds=5, float searchIntervalSeconds=SEARCH_INTERVAL, bool printIfNotDisappear=False)
 
bool Refind (self, float maxSearchSeconds=TIME_OUT_SECOND, float searchIntervalSeconds=SEARCH_INTERVAL, bool raiseException=True)
 
Tuple[int, int] MoveCursorToInnerPos (self, int x=None, int y=None, float ratioX=0.5, float ratioY=0.5, bool simulateMove=True)
 
Tuple[int, int] MoveCursorToMyCenter (self, bool simulateMove=True)
 
None Click (self, int x=None, int y=None, float ratioX=0.5, float ratioY=0.5, bool simulateMove=True, float waitTime=OPERATION_WAIT_TIME)
 
None MiddleClick (self, int x=None, int y=None, float ratioX=0.5, float ratioY=0.5, bool simulateMove=True, float waitTime=OPERATION_WAIT_TIME)
 
None RightClick (self, int x=None, int y=None, float ratioX=0.5, float ratioY=0.5, bool simulateMove=True, float waitTime=OPERATION_WAIT_TIME)
 
None DoubleClick (self, int x=None, int y=None, float ratioX=0.5, float ratioY=0.5, bool simulateMove=True, float waitTime=OPERATION_WAIT_TIME)
 
None DragDrop (self, int x1, int y1, int x2, int y2, float moveSpeed=1, float waitTime=OPERATION_WAIT_TIME)
 
None WheelDown (self, int x=None, int y=None, float ratioX=0.5, float ratioY=0.5, int wheelTimes=1, float interval=0.05, float waitTime=OPERATION_WAIT_TIME)
 
None WheelUp (self, int x=None, int y=None, float ratioX=0.5, float ratioY=0.5, int wheelTimes=1, float interval=0.05, float waitTime=OPERATION_WAIT_TIME)
 
bool ShowWindow (self, int cmdShow, float waitTime=OPERATION_WAIT_TIME)
 
bool Show (self, float waitTime=OPERATION_WAIT_TIME)
 
bool Hide (self, float waitTime=OPERATION_WAIT_TIME)
 
bool MoveWindow (self, int x, int y, int width, int height, bool repaint=True)
 
str GetWindowText (self)
 
bool SetWindowText (self, str text)
 
None SendKey (self, int key, float waitTime=OPERATION_WAIT_TIME)
 
None SendKeys (self, str text, float interval=0.01, float waitTime=OPERATION_WAIT_TIME, bool charMode=True)
 
int GetPixelColor (self, int x, int y)
 
Bitmap ToBitmap (self, int x=0, int y=0, int width=0, int height=0)
 
bool CaptureToImage (self, str savePath, int x=0, int y=0, int width=0, int height=0)
 
bool IsTopLevel (self)
 
'ControlGetTopLevelControl (self)
 
'ControlControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'ButtonControlButtonControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'CalendarControlCalendarControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'CheckBoxControlCheckBoxControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'ComboBoxControlComboBoxControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'CustomControlCustomControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'DataGridControlDataGridControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'DataItemControlDataItemControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'DocumentControlDocumentControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'EditControlEditControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'GroupControlGroupControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'HeaderControlHeaderControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'HeaderItemControlHeaderItemControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'HyperlinkControlHyperlinkControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'ImageControlImageControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'listControl' ListControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'ListItemControlListItemControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'MenuControlMenuControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'MenuBarControlMenuBarControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'MenuItemControlMenuItemControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'PaneControlPaneControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'ProgressBarControlProgressBarControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'RadioButtonControlRadioButtonControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'ScrollBarControlScrollBarControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'SemanticZoomControlSemanticZoomControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'SeparatorControlSeparatorControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'SliderControlSliderControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'SpinnerControlSpinnerControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'SplitButtonControlSplitButtonControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'StatusBarControlStatusBarControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'TabControlTabControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'TabItemControlTabItemControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'TableControlTableControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'TextControlTextControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'ThumbControlThumbControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'TitleBarControlTitleBarControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'ToolBarControlToolBarControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'ToolTipControlToolTipControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'TreeControlTreeControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'TreeItemControlTreeItemControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 
'WindowControlWindowControl (self, searchDepth=0xFFFFFFFF, searchInterval=SEARCH_INTERVAL, foundIndex=1, element=0, **searchProperties)
 

静的公開メンバ関数

'ControlCreateControlFromElement (element)
 
'ControlCreateControlFromControl ('Control' control)
 

公開変数類

 searchFromControl
 
 searchDepth
 
 searchInterval
 
 foundIndex
 
 searchProperties
 
 regexName
 

静的公開変数類

 ValidKeys = set(['ControlType', 'ClassName', 'AutomationId', 'Name', 'SubName', 'RegexName', 'Depth', 'Compare'])
 

構築子と解体子

◆ __init__()

def uiautomation.uiautomation.Control.__init__ (   self,
'Control'   searchFromControl = None,
int   searchDepth = 0xFFFFFFFF,
float   searchInterval = SEARCH_INTERVAL,
int   foundIndex = 1,
  element = None,
**  searchProperties 
)
searchFromControl: `Control` or its subclass, if it is None, search from root control(Desktop).
searchDepth: int, max search depth from searchFromControl.
foundIndex: int, starts with 1, >= 1.
searchInterval: float, wait searchInterval after every search in self.Refind and self.Exists, the global timeout is 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/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationelement

◆ Control()

'Control' uiautomation.uiautomation.Control.Control (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

メソッド詳解

◆ __str__()

str uiautomation.uiautomation.Control.__str__ (   self)

◆ AcceleratorKey()

str uiautomation.uiautomation.Control.AcceleratorKey (   self)
Property AcceleratorKey.
Call IUIAutomationElement::get_CurrentAcceleratorKey.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentacceleratorkey

◆ AccessKey()

str uiautomation.uiautomation.Control.AccessKey (   self)
Property AccessKey.
Call IUIAutomationElement::get_CurrentAccessKey.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentaccesskey

◆ AddSearchProperties()

None uiautomation.uiautomation.Control.AddSearchProperties (   self,
**  searchProperties 
)
Add search properties using `dict.update`.
searchProperties: dict, same as searchProperties in `Control.__init__`.

◆ AriaProperties()

str uiautomation.uiautomation.Control.AriaProperties (   self)
Property AriaProperties.
Call IUIAutomationElement::get_CurrentAriaProperties.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentariaproperties

◆ AriaRole()

str uiautomation.uiautomation.Control.AriaRole (   self)
Property AriaRole.
Call IUIAutomationElement::get_CurrentAriaRole.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentariarole

◆ AutomationId()

str uiautomation.uiautomation.Control.AutomationId (   self)
Property AutomationId.
Call IUIAutomationElement::get_CurrentAutomationId.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentautomationid

◆ BoundingRectangle()

Rect uiautomation.uiautomation.Control.BoundingRectangle (   self)
Property BoundingRectangle.
Call IUIAutomationElement::get_CurrentBoundingRectangle.
Return `Rect`.
Refer https://docs.microsoft.com/en-us/windows/desktop/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())

◆ ButtonControl()

'ButtonControl' uiautomation.uiautomation.Control.ButtonControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ CalendarControl()

'CalendarControl' uiautomation.uiautomation.Control.CalendarControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ CaptureToImage()

bool uiautomation.uiautomation.Control.CaptureToImage (   self,
str  savePath,
int   x = 0,
int   y = 0,
int   width = 0,
int   height = 0 
)
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()

'CheckBoxControl' uiautomation.uiautomation.Control.CheckBoxControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ ClassName()

str uiautomation.uiautomation.Control.ClassName (   self)
Property ClassName.
Call IUIAutomationElement::get_CurrentClassName.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentclassname

◆ Click()

None uiautomation.uiautomation.Control.Click (   self,
int   x = None,
int   y = None,
float   ratioX = 0.5,
float   ratioY = 0.5,
bool   simulateMove = True,
float   waitTime = OPERATION_WAIT_TIME 
)
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()

'ComboBoxControl' uiautomation.uiautomation.Control.ComboBoxControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ ControlType()

int uiautomation.uiautomation.Control.ControlType (   self)
Property ControlType.
Return int, a value in class `ControlType`.
Call IUIAutomationElement::get_CurrentControlType.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentcontroltype

◆ ControlTypeName()

str uiautomation.uiautomation.Control.ControlTypeName (   self)
Property ControlTypeName.

◆ CreateControlFromControl()

'Control' uiautomation.uiautomation.Control.CreateControlFromControl ( 'Control control)
static
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()

'Control' uiautomation.uiautomation.Control.CreateControlFromElement (   element)
static
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.

◆ Culture()

int uiautomation.uiautomation.Control.Culture (   self)
Property Culture.
Call IUIAutomationElement::get_CurrentCulture.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentculture

◆ CustomControl()

'CustomControl' uiautomation.uiautomation.Control.CustomControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ DataGridControl()

'DataGridControl' uiautomation.uiautomation.Control.DataGridControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ DataItemControl()

'DataItemControl' uiautomation.uiautomation.Control.DataItemControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ Disappears()

bool uiautomation.uiautomation.Control.Disappears (   self,
float   maxSearchSeconds = 5,
float   searchIntervalSeconds = SEARCH_INTERVAL,
bool   printIfNotDisappear = False 
)
maxSearchSeconds: float
searchIntervalSeconds: float
Check if control disappears every searchIntervalSeconds seconds in maxSearchSeconds seconds.
Return bool, True if control disappears.

◆ DocumentControl()

'DocumentControl' uiautomation.uiautomation.Control.DocumentControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ DoubleClick()

None uiautomation.uiautomation.Control.DoubleClick (   self,
int   x = None,
int   y = None,
float   ratioX = 0.5,
float   ratioY = 0.5,
bool   simulateMove = True,
float   waitTime = OPERATION_WAIT_TIME 
)
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()

None uiautomation.uiautomation.Control.DragDrop (   self,
int  x1,
int  y1,
int  x2,
int  y2,
float  moveSpeed = 1,
float   waitTime = OPERATION_WAIT_TIME 
)

◆ EditControl()

'EditControl' uiautomation.uiautomation.Control.EditControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ Element()

def uiautomation.uiautomation.Control.Element (   self)
Property Element.
Return `ctypes.POINTER(IUIAutomationElement)`.

◆ Exists()

bool uiautomation.uiautomation.Control.Exists (   self,
float   maxSearchSeconds = 5,
float   searchIntervalSeconds = SEARCH_INTERVAL,
bool   printIfNotExist = False 
)
maxSearchSeconds: float
searchIntervalSeconds: float
Find control every searchIntervalSeconds seconds in maxSearchSeconds seconds.
Return bool, True if find

◆ FrameworkId()

str uiautomation.uiautomation.Control.FrameworkId (   self)
Property FrameworkId.
Call IUIAutomationElement::get_CurrentFrameworkId.
Return str, such as Win32, WPF...
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentframeworkid

◆ GetAncestorControl()

'Control' uiautomation.uiautomation.Control.GetAncestorControl (   self,
Callable[['Control', int], bool]  condition 
)
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()

def uiautomation.uiautomation.Control.GetCachedPattern (   self,
int  patternId,
bool  cache 
)
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()

List['Control'] uiautomation.uiautomation.Control.GetChildren (   self)
Return List[Control], a list of `Control` subclasses.

◆ GetClickablePoint()

Tuple[int, int, bool] uiautomation.uiautomation.Control.GetClickablePoint (   self)
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/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getclickablepoint

◆ GetColorfulSearchPropertiesStr()

str uiautomation.uiautomation.Control.GetColorfulSearchPropertiesStr (   self,
  keyColor = 'DarkGreen',
  valueColor = 'DarkCyan' 
)
keyColor, valueColor: str, color name in class ConsoleColor

◆ GetFirstChildControl()

'Control' uiautomation.uiautomation.Control.GetFirstChildControl (   self)
Return `Control` subclass or None.

◆ GetLastChildControl()

'Control' uiautomation.uiautomation.Control.GetLastChildControl (   self)
Return `Control` subclass or None.

◆ GetLegacyIAccessiblePattern()

LegacyIAccessiblePattern uiautomation.uiautomation.Control.GetLegacyIAccessiblePattern (   self)
Return `LegacyIAccessiblePattern` if it supports the pattern else None.

◆ GetNextSiblingControl()

'Control' uiautomation.uiautomation.Control.GetNextSiblingControl (   self)
Return `Control` subclass or None.

◆ GetParentControl()

'Control' uiautomation.uiautomation.Control.GetParentControl (   self)
Return `Control` subclass or None.

◆ GetPattern()

def uiautomation.uiautomation.Control.GetPattern (   self,
int  patternId 
)
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/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getcurrentpattern

◆ GetPatternAs()

def uiautomation.uiautomation.Control.GetPatternAs (   self,
int  patternId,
  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/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getcurrentpatternas

◆ GetPixelColor()

int uiautomation.uiautomation.Control.GetPixelColor (   self,
int  x,
int  y 
)
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

◆ GetPreviousSiblingControl()

'Control' uiautomation.uiautomation.Control.GetPreviousSiblingControl (   self)
Return `Control` subclass or None.

◆ GetPropertyValue()

Any uiautomation.uiautomation.Control.GetPropertyValue (   self,
int  propertyId 
)
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/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getcurrentpropertyvalue

◆ GetPropertyValueEx()

Any uiautomation.uiautomation.Control.GetPropertyValueEx (   self,
int  propertyId,
int  ignoreDefaultValue 
)
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/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getcurrentpropertyvalueex

◆ GetRuntimeId()

List[int] uiautomation.uiautomation.Control.GetRuntimeId (   self)
Call IUIAutomationElement::GetRuntimeId.
Return List[int], a list of int.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getruntimeid

◆ GetSearchPropertiesStr()

str uiautomation.uiautomation.Control.GetSearchPropertiesStr (   self)

◆ GetSiblingControl()

'Control' uiautomation.uiautomation.Control.GetSiblingControl (   self,
Callable[['Control'], bool]  condition,
bool   forward = True 
)
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()

'Control' uiautomation.uiautomation.Control.GetTopLevelControl (   self)
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()

str uiautomation.uiautomation.Control.GetWindowText (   self)
Call native GetWindowText if control has a valid native handle.

◆ GroupControl()

'GroupControl' uiautomation.uiautomation.Control.GroupControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ HasKeyboardFocus()

bool uiautomation.uiautomation.Control.HasKeyboardFocus (   self)
Property HasKeyboardFocus.
Call IUIAutomationElement::get_CurrentHasKeyboardFocus.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currenthaskeyboardfocus

◆ HeaderControl()

'HeaderControl' uiautomation.uiautomation.Control.HeaderControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ HeaderItemControl()

'HeaderItemControl' uiautomation.uiautomation.Control.HeaderItemControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ HelpText()

str uiautomation.uiautomation.Control.HelpText (   self)
Property HelpText.
Call IUIAutomationElement::get_CurrentHelpText.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currenthelptext

◆ Hide()

bool uiautomation.uiautomation.Control.Hide (   self,
float   waitTime = OPERATION_WAIT_TIME 
)
Call native `ShowWindow(SW.Hide)`.
waitTime: float
Return bool, True if succeed otherwise False.

◆ HyperlinkControl()

'HyperlinkControl' uiautomation.uiautomation.Control.HyperlinkControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ ImageControl()

'ImageControl' uiautomation.uiautomation.Control.ImageControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ IsContentElement()

bool uiautomation.uiautomation.Control.IsContentElement (   self)
Property IsContentElement.
Call IUIAutomationElement::get_CurrentIsContentElement.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentiscontentelement

◆ IsControlElement()

bool uiautomation.uiautomation.Control.IsControlElement (   self)
Property IsControlElement.
Call IUIAutomationElement::get_CurrentIsControlElement.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentiscontrolelement

◆ IsDataValidForForm()

bool uiautomation.uiautomation.Control.IsDataValidForForm (   self)
Property IsDataValidForForm.
Call IUIAutomationElement::get_CurrentIsDataValidForForm.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentisdatavalidforform

◆ IsEnabled()

bool uiautomation.uiautomation.Control.IsEnabled (   self)
Property IsEnabled.
Call IUIAutomationElement::get_CurrentIsEnabled.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentisenabled

◆ IsKeyboardFocusable()

bool uiautomation.uiautomation.Control.IsKeyboardFocusable (   self)
Property IsKeyboardFocusable.
Call IUIAutomationElement::get_CurrentIsKeyboardFocusable.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentiskeyboardfocusable

◆ IsOffscreen()

bool uiautomation.uiautomation.Control.IsOffscreen (   self)
Property IsOffscreen.
Call IUIAutomationElement::get_CurrentIsOffscreen.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentisoffscreen

◆ IsPassword()

bool uiautomation.uiautomation.Control.IsPassword (   self)
Property IsPassword.
Call IUIAutomationElement::get_CurrentIsPassword.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentispassword

◆ IsRequiredForForm()

bool uiautomation.uiautomation.Control.IsRequiredForForm (   self)
Property IsRequiredForForm.
Call IUIAutomationElement::get_CurrentIsRequiredForForm.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentisrequiredforform

◆ IsTopLevel()

bool uiautomation.uiautomation.Control.IsTopLevel (   self)
Determine whether current control is top level.

◆ ItemStatus()

str uiautomation.uiautomation.Control.ItemStatus (   self)
Property ItemStatus.
Call IUIAutomationElement::get_CurrentItemStatus.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentitemstatus

◆ ItemType()

str uiautomation.uiautomation.Control.ItemType (   self)
Property ItemType.
Call IUIAutomationElement::get_CurrentItemType.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentitemtype

◆ ListControl()

'listControl' uiautomation.uiautomation.Control.ListControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ ListItemControl()

'ListItemControl' uiautomation.uiautomation.Control.ListItemControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ LocalizedControlType()

str uiautomation.uiautomation.Control.LocalizedControlType (   self)
Property LocalizedControlType.
Call IUIAutomationElement::get_CurrentLocalizedControlType.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentlocalizedcontroltype

◆ MenuBarControl()

'MenuBarControl' uiautomation.uiautomation.Control.MenuBarControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ MenuControl()

'MenuControl' uiautomation.uiautomation.Control.MenuControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ MenuItemControl()

'MenuItemControl' uiautomation.uiautomation.Control.MenuItemControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ MiddleClick()

None uiautomation.uiautomation.Control.MiddleClick (   self,
int   x = None,
int   y = None,
float   ratioX = 0.5,
float   ratioY = 0.5,
bool   simulateMove = True,
float   waitTime = OPERATION_WAIT_TIME 
)
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()

Tuple[int, int] uiautomation.uiautomation.Control.MoveCursorToInnerPos (   self,
int   x = None,
int   y = None,
float   ratioX = 0.5,
float   ratioY = 0.5,
bool   simulateMove = True 
)
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()

Tuple[int, int] uiautomation.uiautomation.Control.MoveCursorToMyCenter (   self,
bool   simulateMove = True 
)
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()

bool uiautomation.uiautomation.Control.MoveWindow (   self,
int  x,
int  y,
int  width,
int  height,
bool   repaint = True 
)
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.

◆ Name()

str uiautomation.uiautomation.Control.Name (   self)
Property Name.
Call IUIAutomationElement::get_CurrentName.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentname

◆ NativeWindowHandle()

str uiautomation.uiautomation.Control.NativeWindowHandle (   self)
Property NativeWindowHandle.
Call IUIAutomationElement::get_CurrentNativeWindowHandle.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentnativewindowhandle

◆ Orientation()

int uiautomation.uiautomation.Control.Orientation (   self)
Property Orientation.
Return int, a value in class `OrientationType`.
Call IUIAutomationElement::get_CurrentOrientation.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentorientation

◆ PaneControl()

'PaneControl' uiautomation.uiautomation.Control.PaneControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ ProcessId()

int uiautomation.uiautomation.Control.ProcessId (   self)
Property ProcessId.
Call IUIAutomationElement::get_CurrentProcessId.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentprocessid

◆ ProgressBarControl()

'ProgressBarControl' uiautomation.uiautomation.Control.ProgressBarControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ ProviderDescription()

str uiautomation.uiautomation.Control.ProviderDescription (   self)
Property ProviderDescription.
Call IUIAutomationElement::get_CurrentProviderDescription.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentproviderdescription

◆ RadioButtonControl()

'RadioButtonControl' uiautomation.uiautomation.Control.RadioButtonControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ Refind()

bool uiautomation.uiautomation.Control.Refind (   self,
float   maxSearchSeconds = TIME_OUT_SECOND,
float   searchIntervalSeconds = SEARCH_INTERVAL,
bool   raiseException = True 
)
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()

None uiautomation.uiautomation.Control.RemoveSearchProperties (   self,
**  searchProperties 
)
searchProperties: dict, same as searchProperties in `Control.__init__`.

◆ RightClick()

None uiautomation.uiautomation.Control.RightClick (   self,
int   x = None,
int   y = None,
float   ratioX = 0.5,
float   ratioY = 0.5,
bool   simulateMove = True,
float   waitTime = OPERATION_WAIT_TIME 
)
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.

◆ ScrollBarControl()

'ScrollBarControl' uiautomation.uiautomation.Control.ScrollBarControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ SemanticZoomControl()

'SemanticZoomControl' uiautomation.uiautomation.Control.SemanticZoomControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ SendKey()

None uiautomation.uiautomation.Control.SendKey (   self,
int  key,
float   waitTime = OPERATION_WAIT_TIME 
)
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()

None uiautomation.uiautomation.Control.SendKeys (   self,
str  text,
float   interval = 0.01,
float   waitTime = OPERATION_WAIT_TIME,
bool   charMode = True 
)
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()

'SeparatorControl' uiautomation.uiautomation.Control.SeparatorControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ SetFocus()

bool uiautomation.uiautomation.Control.SetFocus (   self)
Call IUIAutomationElement::SetFocus.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-setfocus

◆ SetSearchDepth()

None uiautomation.uiautomation.Control.SetSearchDepth (   self,
int  searchDepth 
)

◆ SetSearchFromControl()

None uiautomation.uiautomation.Control.SetSearchFromControl (   self,
'Control searchFromControl 
)
searchFromControl: `Control` or its subclass

◆ SetWindowText()

bool uiautomation.uiautomation.Control.SetWindowText (   self,
str  text 
)
Call native SetWindowText if control has a valid native handle.

◆ Show()

bool uiautomation.uiautomation.Control.Show (   self,
float   waitTime = OPERATION_WAIT_TIME 
)
Call native `ShowWindow(SW.Show)`.
Return bool, True if succeed otherwise False.

◆ ShowWindow()

bool uiautomation.uiautomation.Control.ShowWindow (   self,
int  cmdShow,
float   waitTime = OPERATION_WAIT_TIME 
)
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()

'SliderControl' uiautomation.uiautomation.Control.SliderControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ SpinnerControl()

'SpinnerControl' uiautomation.uiautomation.Control.SpinnerControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ SplitButtonControl()

'SplitButtonControl' uiautomation.uiautomation.Control.SplitButtonControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ StatusBarControl()

'StatusBarControl' uiautomation.uiautomation.Control.StatusBarControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ TabControl()

'TabControl' uiautomation.uiautomation.Control.TabControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ TabItemControl()

'TabItemControl' uiautomation.uiautomation.Control.TabItemControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ TableControl()

'TableControl' uiautomation.uiautomation.Control.TableControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ TextControl()

'TextControl' uiautomation.uiautomation.Control.TextControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ ThumbControl()

'ThumbControl' uiautomation.uiautomation.Control.ThumbControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ TitleBarControl()

'TitleBarControl' uiautomation.uiautomation.Control.TitleBarControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ ToBitmap()

Bitmap uiautomation.uiautomation.Control.ToBitmap (   self,
int   x = 0,
int   y = 0,
int   width = 0,
int   height = 0 
)
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()

'ToolBarControl' uiautomation.uiautomation.Control.ToolBarControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ ToolTipControl()

'ToolTipControl' uiautomation.uiautomation.Control.ToolTipControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ TreeControl()

'TreeControl' uiautomation.uiautomation.Control.TreeControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ TreeItemControl()

'TreeItemControl' uiautomation.uiautomation.Control.TreeItemControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

◆ WheelDown()

None uiautomation.uiautomation.Control.WheelDown (   self,
int   x = None,
int   y = None,
float   ratioX = 0.5,
float   ratioY = 0.5,
int   wheelTimes = 1,
float   interval = 0.05,
float   waitTime = OPERATION_WAIT_TIME 
)
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()

None uiautomation.uiautomation.Control.WheelUp (   self,
int   x = None,
int   y = None,
float   ratioX = 0.5,
float   ratioY = 0.5,
int   wheelTimes = 1,
float   interval = 0.05,
float   waitTime = OPERATION_WAIT_TIME 
)
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()

'WindowControl' uiautomation.uiautomation.Control.WindowControl (   self,
  searchDepth = 0xFFFFFFFF,
  searchInterval = SEARCH_INTERVAL,
  foundIndex = 1,
  element = 0,
**  searchProperties 
)

メンバ詳解

◆ foundIndex

uiautomation.uiautomation.Control.foundIndex

◆ regexName

uiautomation.uiautomation.Control.regexName

◆ searchDepth

uiautomation.uiautomation.Control.searchDepth

◆ searchFromControl

uiautomation.uiautomation.Control.searchFromControl

◆ searchInterval

uiautomation.uiautomation.Control.searchInterval

◆ searchProperties

uiautomation.uiautomation.Control.searchProperties

◆ ValidKeys

uiautomation.uiautomation.Control.ValidKeys = set(['ControlType', 'ClassName', 'AutomationId', 'Name', 'SubName', 'RegexName', 'Depth', 'Compare'])
static

このクラス詳解は次のファイルから抽出されました: