code
stringlengths
66
870k
docstring
stringlengths
19
26.7k
func_name
stringlengths
1
138
language
stringclasses
1 value
repo
stringlengths
7
68
path
stringlengths
5
324
url
stringlengths
46
389
license
stringclasses
7 values
def Scroll(self, horizontalAmount: int, verticalAmount: int, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationScrollPattern::Scroll. Scroll the visible region of the content area horizontally and vertically. horizontalAmount: int, a value in ScrollAmount. ver...
Call IUIAutomationScrollPattern::Scroll. Scroll the visible region of the content area horizontally and vertically. horizontalAmount: int, a value in ScrollAmount. verticalAmount: int, a value in ScrollAmount. waitTime: float. Return bool, True if succeed otherwise False...
Scroll
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def SetScrollPercent(self, horizontalPercent: float, verticalPercent: float, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationScrollPattern::SetScrollPercent. Set the horizontal and vertical scroll positions as a percentage of the total content area within the UI Automation ...
Call IUIAutomationScrollPattern::SetScrollPercent. Set the horizontal and vertical scroll positions as a percentage of the total content area within the UI Automation element. horizontalPercent: float or int, a value in [0, 100] or ScrollPattern.NoScrollValue(-1) if no scroll. verticalP...
SetScrollPercent
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def AddToSelection(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationSelectionItemPattern::AddToSelection. Add the current element to the collection of selected items. waitTime: float. Return bool, True if succeed otherwise False. Refer https://d...
Call IUIAutomationSelectionItemPattern::AddToSelection. Add the current element to the collection of selected items. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient...
AddToSelection
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def RemoveFromSelection(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationSelectionItemPattern::RemoveFromSelection. Remove this element from the selection. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microso...
Call IUIAutomationSelectionItemPattern::RemoveFromSelection. Remove this element from the selection. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationse...
RemoveFromSelection
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Select(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationSelectionItemPattern::Select. Clear any selected items and then select the current element. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.c...
Call IUIAutomationSelectionItemPattern::Select. Clear any selected items and then select the current element. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiaut...
Select
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetSelection(self) -> List['Control']: """ Call IUIAutomationSelectionPattern::GetCurrentSelection. Return List[Control], a list of `Control` subclasses, the selected elements in the container.. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautoma...
Call IUIAutomationSelectionPattern::GetCurrentSelection. Return List[Control], a list of `Control` subclasses, the selected elements in the container.. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionpattern-getcurrentsel...
GetSelection
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetAnnotationObjects(self) -> List['Control']: """ Call IUIAutomationSelectionPattern::GetCurrentAnnotationObjects. Return List[Control], a list of `Control` subclasses representing the annotations associated with this spreadsheet cell. Refer https://docs.microsoft.com/en-us/windows/...
Call IUIAutomationSelectionPattern::GetCurrentAnnotationObjects. Return List[Control], a list of `Control` subclasses representing the annotations associated with this spreadsheet cell. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautoma...
GetAnnotationObjects
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetColumnHeaderItems(self) -> List['Control']: """ Call IUIAutomationTableItemPattern::GetCurrentColumnHeaderItems. Return List[Control], a list of `Control` subclasses, the column headers associated with a table item or cell. Refer https://docs.microsoft.com/en-us/windows/desktop/ap...
Call IUIAutomationTableItemPattern::GetCurrentColumnHeaderItems. Return List[Control], a list of `Control` subclasses, the column headers associated with a table item or cell. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtablei...
GetColumnHeaderItems
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetRowHeaderItems(self) -> List['Control']: """ Call IUIAutomationTableItemPattern::GetCurrentRowHeaderItems. Return List[Control], a list of `Control` subclasses, the row headers associated with a table item or cell. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautom...
Call IUIAutomationTableItemPattern::GetCurrentRowHeaderItems. Return List[Control], a list of `Control` subclasses, the row headers associated with a table item or cell. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtableitempat...
GetRowHeaderItems
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetColumnHeaders(self) -> List['Control']: """ Call IUIAutomationTablePattern::GetCurrentColumnHeaders. Return List[Control], a list of `Control` subclasses, representing all the column headers in a table.. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient...
Call IUIAutomationTablePattern::GetCurrentColumnHeaders. Return List[Control], a list of `Control` subclasses, representing all the column headers in a table.. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtablepattern-getcurren...
GetColumnHeaders
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetRowHeaders(self) -> List['Control']: """ Call IUIAutomationTablePattern::GetCurrentRowHeaders. Return List[Control], a list of `Control` subclasses, representing all the row headers in a table. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiauto...
Call IUIAutomationTablePattern::GetCurrentRowHeaders. Return List[Control], a list of `Control` subclasses, representing all the row headers in a table. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtablepattern-getcurrentrowhea...
GetRowHeaders
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def AddToSelection(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTextRange::AddToSelection. Add the text range to the collection of selected text ranges in a control that supports multiple, disjoint spans of selected text. waitTime: float. Return boo...
Call IUIAutomationTextRange::AddToSelection. Add the text range to the collection of selected text ranges in a control that supports multiple, disjoint spans of selected text. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/w...
AddToSelection
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def ExpandToEnclosingUnit(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTextRange::ExpandToEnclosingUnit. Normalize the text range by the specified text unit. The range is expanded if it is smaller than the specified unit, or shortened if it ...
Call IUIAutomationTextRange::ExpandToEnclosingUnit. Normalize the text range by the specified text unit. The range is expanded if it is smaller than the specified unit, or shortened if it is longer than the specified unit. waitTime: float. Return bool, True if su...
ExpandToEnclosingUnit
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def FindAttribute(self, textAttributeId: int, val, backward: bool) -> 'TextRange': """ Call IUIAutomationTextRange::FindAttribute. textAttributeID: int, a value in class `TextAttributeId`. val: COM VARIANT according to textAttributeId? todo. backward: bool, True if the last occur...
Call IUIAutomationTextRange::FindAttribute. textAttributeID: int, a value in class `TextAttributeId`. val: COM VARIANT according to textAttributeId? todo. backward: bool, True if the last occurring text range should be returned instead of the first; otherwise False. return `Text...
FindAttribute
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def FindText(self, text: str, backward: bool, ignoreCase: bool) -> 'TextRange': """ Call IUIAutomationTextRange::FindText. text: str, backward: bool, True if the last occurring text range should be returned instead of the first; otherwise False. ignoreCase: bool, True if case sho...
Call IUIAutomationTextRange::FindText. text: str, backward: bool, True if the last occurring text range should be returned instead of the first; otherwise False. ignoreCase: bool, True if case should be ignored; otherwise False. return `TextRange` or None, a text range subset th...
FindText
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetBoundingRectangles(self) -> List[Rect]: """ Call IUIAutomationTextRange::GetBoundingRectangles. textAttributeId: int, a value in class `TextAttributeId`. Return List[Rect], a list of `Rect`. bounding rectangles for each fully or partially visible line of text in a text...
Call IUIAutomationTextRange::GetBoundingRectangles. textAttributeId: int, a value in class `TextAttributeId`. Return List[Rect], a list of `Rect`. bounding rectangles for each fully or partially visible line of text in a text range.. Refer https://docs.microsoft.com/en-us/wi...
GetBoundingRectangles
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetChildren(self) -> List['Control']: """ Call IUIAutomationTextRange::GetChildren. textAttributeId: int, a value in class `TextAttributeId`. Return List[Control], a list of `Control` subclasses, embedded objects that fall within the text range.. Refer https://docs.microsoft....
Call IUIAutomationTextRange::GetChildren. textAttributeId: int, a value in class `TextAttributeId`. Return List[Control], a list of `Control` subclasses, embedded objects that fall within the text range.. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-u...
GetChildren
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Move(self, unit: int, count: int, waitTime: float = OPERATION_WAIT_TIME) -> int: """ Call IUIAutomationTextRange::Move. Move the text range forward or backward by the specified number of text units. unit: int, a value in class `TextUnit`. count: int, the number of text units ...
Call IUIAutomationTextRange::Move. Move the text range forward or backward by the specified number of text units. unit: int, a value in class `TextUnit`. count: int, the number of text units to move. A positive value moves the text range forward. A negative...
Move
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def MoveEndpointByRange(self, srcEndPoint: int, textRange: 'TextRange', targetEndPoint: int, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTextRange::MoveEndpointByRange. Move one endpoint of the current text range to the specified endpoint of a second text range. ...
Call IUIAutomationTextRange::MoveEndpointByRange. Move one endpoint of the current text range to the specified endpoint of a second text range. srcEndPoint: int, a value in class `TextPatternRangeEndpoint`. textRange: `TextRange`. targetEndPoint: int, a value in class `TextPatte...
MoveEndpointByRange
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def MoveEndpointByUnit(self, endPoint: int, unit: int, count: int, waitTime: float = OPERATION_WAIT_TIME) -> int: """ Call IUIAutomationTextRange::MoveEndpointByUnit. Move one endpoint of the text range the specified number of text units within the document range. endPoint: int, a value ...
Call IUIAutomationTextRange::MoveEndpointByUnit. Move one endpoint of the text range the specified number of text units within the document range. endPoint: int, a value in class `TextPatternRangeEndpoint`. unit: int, a value in class `TextUnit`. count: int, the number of units ...
MoveEndpointByUnit
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def RemoveFromSelection(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTextRange::RemoveFromSelection. Remove the text range from an existing collection of selected text in a text container that supports multiple, disjoint selections. waitTime: float. ...
Call IUIAutomationTextRange::RemoveFromSelection. Remove the text range from an existing collection of selected text in a text container that supports multiple, disjoint selections. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/e...
RemoveFromSelection
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def ScrollIntoView(self, alignTop: bool = True, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTextRange::ScrollIntoView. Cause the text control to scroll until the text range is visible in the viewport. alignTop: bool, True if the text control should be scrolled s...
Call IUIAutomationTextRange::ScrollIntoView. Cause the text control to scroll until the text range is visible in the viewport. alignTop: bool, True if the text control should be scrolled so that the text range is flush with the top of the viewport; False if it should be ...
ScrollIntoView
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Select(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTextRange::Select. Select the span of text that corresponds to this text range, and remove any previous selection. waitTime: float. Return bool, True if succeed otherwise False. Refer h...
Call IUIAutomationTextRange::Select. Select the span of text that corresponds to this text range, and remove any previous selection. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-ui...
Select
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetActiveComposition(self) -> TextRange: """ Call IUIAutomationTextEditPattern::GetActiveComposition. Return `TextRange` or None, the active composition. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtexteditpattern-g...
Call IUIAutomationTextEditPattern::GetActiveComposition. Return `TextRange` or None, the active composition. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtexteditpattern-getactivecomposition
GetActiveComposition
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetConversionTarget(self) -> TextRange: """ Call IUIAutomationTextEditPattern::GetConversionTarget. Return `TextRange` or None, the current conversion target range.. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtexte...
Call IUIAutomationTextEditPattern::GetConversionTarget. Return `TextRange` or None, the current conversion target range.. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtexteditpattern-getconversiontarget
GetConversionTarget
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetSelection(self) -> List[TextRange]: """ Call IUIAutomationTextPattern::GetSelection. Return List[TextRange], a list of `TextRange`, represents the currently selected text in a text-based control. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiau...
Call IUIAutomationTextPattern::GetSelection. Return List[TextRange], a list of `TextRange`, represents the currently selected text in a text-based control. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-getselection ...
GetSelection
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetVisibleRanges(self) -> List[TextRange]: """ Call IUIAutomationTextPattern::GetVisibleRanges. Return List[TextRange], a list of `TextRange`, disjoint text ranges from a text-based control where each text range represents a contiguous span of visible text. Refer...
Call IUIAutomationTextPattern::GetVisibleRanges. Return List[TextRange], a list of `TextRange`, disjoint text ranges from a text-based control where each text range represents a contiguous span of visible text. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiau...
GetVisibleRanges
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def RangeFromChild(self, child) -> TextRange: """ Call IUIAutomationTextPattern::RangeFromChild. child: `Control` or its subclass. Return `TextRange` or None, a text range enclosing a child element such as an image, hyperlink, Microsoft Excel spreadsheet, or other embedded ob...
Call IUIAutomationTextPattern::RangeFromChild. child: `Control` or its subclass. Return `TextRange` or None, a text range enclosing a child element such as an image, hyperlink, Microsoft Excel spreadsheet, or other embedded object. Refer https://docs.microsoft.com/en-us/wind...
RangeFromChild
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def RangeFromPoint(self, x: int, y: int) -> TextRange: """ Call IUIAutomationTextPattern::RangeFromPoint. child: `Control` or its subclass. Return `TextRange` or None, the degenerate (empty) text range nearest to the specified screen coordinates. Refer https://docs.microsoft.com/...
Call IUIAutomationTextPattern::RangeFromPoint. child: `Control` or its subclass. Return `TextRange` or None, the degenerate (empty) text range nearest to the specified screen coordinates. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient...
RangeFromPoint
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Toggle(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTogglePattern::Toggle. Cycle through the toggle states of the control. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desk...
Call IUIAutomationTogglePattern::Toggle. Cycle through the toggle states of the control. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtogglepattern-...
Toggle
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Move(self, x: int, y: int, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTransformPattern::Move. Move the UI Automation element. x: int. y: int. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.m...
Call IUIAutomationTransformPattern::Move. Move the UI Automation element. x: int. y: int. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomat...
Move
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Resize(self, width: int, height: int, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTransformPattern::Resize. Resize the UI Automation element. width: int. height: int. waitTime: float. Return bool, True if succeed otherwise False. ...
Call IUIAutomationTransformPattern::Resize. Resize the UI Automation element. width: int. height: int. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclie...
Resize
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Rotate(self, degrees: int, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTransformPattern::Rotate. Rotates the UI Automation element. degrees: int. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.micros...
Call IUIAutomationTransformPattern::Rotate. Rotates the UI Automation element. degrees: int. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtr...
Rotate
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Zoom(self, zoomLevel: float, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTransformPattern2::Zoom. Zoom the viewport of the control. zoomLevel: float for int. waitTime: float. Return bool, True if succeed otherwise False. Refer https:/...
Call IUIAutomationTransformPattern2::Zoom. Zoom the viewport of the control. zoomLevel: float for int. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiau...
Zoom
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def ZoomByUnit(self, zoomUnit: int, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTransformPattern2::ZoomByUnit. Zoom the viewport of the control by the specified unit. zoomUnit: int, a value in class `ZoomUnit`. waitTime: float. Return bool, True ...
Call IUIAutomationTransformPattern2::ZoomByUnit. Zoom the viewport of the control by the specified unit. zoomUnit: int, a value in class `ZoomUnit`. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/...
ZoomByUnit
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def SetValue(self, value: str, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationTransformPattern2::IUIAutomationValuePattern::SetValue. Set the value of the element. value: str. waitTime: float. Return bool, True if succeed otherwise False. Re...
Call IUIAutomationTransformPattern2::IUIAutomationValuePattern::SetValue. Set the value of the element. value: str. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomatio...
SetValue
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Realize(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationVirtualizedItemPattern::Realize. Create a full UI Automation element for a virtualized item. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft...
Call IUIAutomationVirtualizedItemPattern::Realize. Create a full UI Automation element for a virtualized item. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiau...
Realize
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Close(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationWindowPattern::Close. Close the window. waitTime: float. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-close ...
Call IUIAutomationWindowPattern::Close. Close the window. waitTime: float. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-close
Close
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def SetWindowVisualState(self, state: int, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Call IUIAutomationWindowPattern::SetWindowVisualState. Minimize, maximize, or restore the window. state: int, a value in class `WindowVisualState`. waitTime: float. Return bool,...
Call IUIAutomationWindowPattern::SetWindowVisualState. Minimize, maximize, or restore the window. state: int, a value in class `WindowVisualState`. waitTime: float. Return bool, True if succeed otherwise False. Refer https://docs.microsoft.com/en-us/windows/desktop/api/u...
SetWindowVisualState
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def CreatePattern(patternId: int, pattern: ctypes.POINTER(comtypes.IUnknown)): """Create a concreate pattern by pattern id and pattern(POINTER(IUnknown)).""" subPattern = pattern.QueryInterface(GetPatternIdInterface(patternId)) if subPattern: return PatternConstructors[patternId](pattern=subPattern)
Create a concreate pattern by pattern id and pattern(POINTER(IUnknown)).
CreatePattern
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def __init__(self, searchFromControl: 'Control' = None, searchDepth: int = 0xFFFFFFFF, searchInterval: float = SEARCH_INTERVAL, foundIndex: int = 1, element=None, **searchProperties): """ searchFromControl: `Control` or its subclass, if it is None, search from root control(Desktop). searchDepth:...
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, ...
__init__
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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. """ if element: ...
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.
CreateControlFromElement
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def AddSearchProperties(self, **searchProperties) -> None: """ Add search properties using `dict.update`. searchProperties: dict, same as searchProperties in `Control.__init__`. """ self.searchProperties.update(searchProperties) if 'Depth' in searchProperties: ...
Add search properties using `dict.update`. searchProperties: dict, same as searchProperties in `Control.__init__`.
AddSearchProperties
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def RemoveSearchProperties(self, **searchProperties) -> None: """ searchProperties: dict, same as searchProperties in `Control.__init__`. """ for key in searchProperties: del self.searchProperties[key] if key == 'RegexName': self.regexName = None
searchProperties: dict, same as searchProperties in `Control.__init__`.
RemoveSearchProperties
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetColorfulSearchPropertiesStr(self, keyColor='DarkGreen', valueColor='DarkCyan') -> str: """keyColor, valueColor: str, color name in class ConsoleColor""" strs = ['<Color={}>{}</Color>: <Color={}>{}</Color>'.format(keyColor if k in Control.ValidKeys else 'DarkYellow', k, valueColor, ...
keyColor, valueColor: str, color name in class ConsoleColor
GetColorfulSearchPropertiesStr
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def BoundingRectangle(self) -> Rect: """ Property BoundingRectangle. Call IUIAutomationElement::get_CurrentBoundingRectangle. Return `Rect`. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentboundin...
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.BoundingRecta...
BoundingRectangle
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def ScreenShot(self, savePath: str=None) -> str: """ Save the control's screenshot to savePath. savePath: str, the path to save the screenshot. Return str, the path of the saved screenshot. """ rect = self.Element.CurrentBoundingRectangle bbox = (rect.left, rect.t...
Save the control's screenshot to savePath. savePath: str, the path to save the screenshot. Return str, the path of the saved screenshot.
ScreenShot
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def NativeWindowHandle(self) -> str: """ Property NativeWindowHandle. Call IUIAutomationElement::get_CurrentNativeWindowHandle. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentnativewindowhandle "...
Property NativeWindowHandle. Call IUIAutomationElement::get_CurrentNativeWindowHandle. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentnativewindowhandle
NativeWindowHandle
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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/desktop/api/uiautomationclient/nf-uiautomati...
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
GetClickablePoint
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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/desktop/api/uiautomationclient/nf-uiaut...
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-getcurrentpatt...
GetPattern
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def SetFocus(self) -> bool: """ Call IUIAutomationElement::SetFocus. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-setfocus """ try: return self.Element.SetFocus() == S_OK except comtyp...
Call IUIAutomationElement::SetFocus. Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-setfocus
SetFocus
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Element(self): """ Property Element. Return `ctypes.POINTER(IUIAutomationElement)`. """ if not self._element: self.Refind(maxSearchSeconds=TIME_OUT_SECOND, searchIntervalSeconds=self.searchInterval) return self._element
Property Element. Return `ctypes.POINTER(IUIAutomationElement)`.
Element
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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 `sel...
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`.
GetCachedPattern
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetAncestorControl(self, condition: Callable[['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 sea...
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.
GetAncestorControl
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetSiblingControl(self, condition: Callable[['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:...
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.
GetSiblingControl
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetChildControl(self, index: int, control_type: str = None) -> 'Control': """ Get the nth child control. index: int, starts with 0. control_type: `Control` or its subclass, if not None, only return the nth control that matches the control_type. Return `Control` subclass or No...
Get the nth child control. index: int, starts with 0. control_type: `Control` or its subclass, if not None, only return the nth control that matches the control_type. Return `Control` subclass or None.
GetChildControl
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetAllProgeny(self) -> List[List['Control']]: """ Get all progeny controls. Return List[List[Control]], a list of list of `Control` subclasses. """ all_elements = [] def find_all_elements(element, depth=0): children = element.GetChildren() if ...
Get all progeny controls. Return List[List[Control]], a list of list of `Control` subclasses.
GetAllProgeny
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetProgenyControl(self, depth: int=1, index: int=0, control_type: str = None) -> 'Control': """ Get the nth control in the mth depth. depth: int, starts with 0. index: int, starts with 0. control_type: `Control` or its subclass, if not None, only return the nth control that m...
Get the nth control in the mth depth. depth: int, starts with 0. index: int, starts with 0. control_type: `Control` or its subclass, if not None, only return the nth control that matches the control_type. Return `Control` subclass or None.
GetProgenyControl
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetChildren(self) -> List['Control']: """ Return List[Control], a list of `Control` subclasses. """ children = [] child = self.GetFirstChildControl() while child: children.append(child) child = child.GetNextSiblingControl() return child...
Return List[Control], a list of `Control` subclasses.
GetChildren
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def _CompareFunction(self, control: 'Control', depth: int) -> bool: """ Define how to search. control: `Control` or its subclass. depth: int, tree depth from searchFromControl. Return bool. """ for key, value in self.searchProperties.items(): if 'Contr...
Define how to search. control: `Control` or its subclass. depth: int, tree depth from searchFromControl. Return bool.
_CompareFunction
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Exists(self, maxSearchSeconds: float = 5, searchIntervalSeconds: float = SEARCH_INTERVAL, printIfNotExist: bool = False) -> bool: """ maxSearchSeconds: float searchIntervalSeconds: float Find control every searchIntervalSeconds seconds in maxSearchSeconds seconds. Return bool...
maxSearchSeconds: float searchIntervalSeconds: float Find control every searchIntervalSeconds seconds in maxSearchSeconds seconds. Return bool, True if find
Exists
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Disappears(self, maxSearchSeconds: float = 5, searchIntervalSeconds: float = SEARCH_INTERVAL, printIfNotDisappear: bool = False) -> bool: """ maxSearchSeconds: float searchIntervalSeconds: float Check if control disappears every searchIntervalSeconds seconds in maxSearchSeconds secon...
maxSearchSeconds: float searchIntervalSeconds: float Check if control disappears every searchIntervalSeconds seconds in maxSearchSeconds seconds. Return bool, True if control disappears.
Disappears
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Refind(self, maxSearchSeconds: float = TIME_OUT_SECOND, searchIntervalSeconds: float = SEARCH_INTERVAL, raiseException: bool = True) -> bool: """ Refind the control every searchIntervalSeconds seconds in maxSearchSeconds seconds. maxSearchSeconds: float. searchIntervalSeconds: float....
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.
Refind
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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 r...
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. simul...
MoveCursorToInnerPos
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Click(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, simulateMove: bool = True, waitTime: float = OPERATION_WAIT_TIME) -> None: """ x: int, if < 0, click self.BoundingRectangle.right + x, if not None, ignore ratioX. y: int, if < 0, click self.BoundingRectangle....
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. wait...
Click
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def MiddleClick(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, simulateMove: bool = True, waitTime: float = OPERATION_WAIT_TIME) -> None: """ x: int, if < 0, middle click self.BoundingRectangle.right + x, if not None, ignore ratioX. y: int, if < 0, middle click sel...
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...
MiddleClick
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def RightClick(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, simulateMove: bool = True, waitTime: float = OPERATION_WAIT_TIME) -> None: """ x: int, if < 0, right click self.BoundingRectangle.right + x, if not None, ignore ratioX. y: int, if < 0, right click self.B...
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. ...
RightClick
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def DoubleClick(self, x: int = None, y: int = None, ratioX: float = 0.5, ratioY: float = 0.5, simulateMove: bool = True, waitTime: float = OPERATION_WAIT_TIME) -> None: """ x: int, if < 0, right click self.BoundingRectangle.right + x, if not None, ignore ratioX. y: int, if < 0, right click self....
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. ...
DoubleClick
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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 = OPERATION_WAIT_TIME) -> None: """ Make control have focus first, move cursor to the specified position and mouse wheel down. x: int, if < 0, ...
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. ratio...
WheelDown
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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 = OPERATION_WAIT_TIME) -> None: """ Make control have focus first, move cursor to the specified position and mouse wheel up. x: int, if < 0, move...
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:...
WheelUp
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def ShowWindow(self, cmdShow: int, waitTime: float = OPERATION_WAIT_TIME) -> 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...
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.
ShowWindow
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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 Fal...
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.
MoveWindow
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def GetWindowText(self) -> str: """ Call native GetWindowText if control has a valid native handle. """ handle = self.NativeWindowHandle if handle: return GetWindowText(handle)
Call native GetWindowText if control has a valid native handle.
GetWindowText
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def SetWindowText(self, text: str) -> bool: """ Call native SetWindowText if control has a valid native handle. """ handle = self.NativeWindowHandle if handle: return SetWindowText(handle, text) return False
Call native SetWindowText if control has a valid native handle.
SetWindowText
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def SendKeys(self, text: str, interval: float = 0.01, waitTime: float = OPERATION_WAIT_TIME, 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...
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, ...
SendKeys
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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...
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 ...
GetPixelColor
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def ToBitmap(self, x: int = 0, y: int = 0, width: int = 0, height: int = 0) -> 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. ...
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). ...
ToBitmap
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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). ...
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 he...
CaptureToImage
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def IsTopLevel(self) -> bool: """Determine whether current control is top level.""" handle = self.NativeWindowHandle if handle: return GetAncestor(handle, GAFlag.Root) == handle return False
Determine whether current control is top level.
IsTopLevel
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def 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. """ handle = self.N...
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.
GetTopLevelControl
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Select(self, itemName: str = '', condition: Callable[[str], bool] = None, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Show combobox's popup menu and select a item by name. itemName: str. condition: Callable[[str], bool], function(comboBoxItemName: str) -> bool, if condition i...
Show combobox's popup menu and select a item by name. itemName: str. condition: Callable[[str], bool], function(comboBoxItemName: str) -> bool, if condition is valid, ignore itemName. waitTime: float. Some comboboxs doesn't support SelectionPattern, here is a workaround. ...
Select
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def SetTopmost(self, isTopmost: bool = True, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Set top level window topmost. isTopmost: bool. waitTime: float. """ if self.IsTopLevel(): ret = SetWindowTopmost(self.NativeWindowHandle, isTopmost) ti...
Set top level window topmost. isTopmost: bool. waitTime: float.
SetTopmost
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def Restore(self, waitTime: float = OPERATION_WAIT_TIME) -> bool: """ Restore window to normal state. Similar to SwitchToThisWindow. """ if self.IsTopLevel(): return self.ShowWindow(SW.Restore, waitTime) return False
Restore window to normal state. Similar to SwitchToThisWindow.
Restore
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def MetroClose(self, waitTime: float = OPERATION_WAIT_TIME) -> None: """ Only work on Windows 8/8.1, if current window is Metro UI. waitTime: float. """ if self.ClassName == METRO_WINDOW_CLASS_NAME: screenWidth, screenHeight = GetScreenSize() MoveTo(screen...
Only work on Windows 8/8.1, if current window is Metro UI. waitTime: float.
MetroClose
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def SetGlobalSearchTimeout(seconds: float) -> None: """ seconds: float. To make this available, you need explicitly import uiautomation: from uiautomation import uiautomation as auto auto.SetGlobalSearchTimeout(10) """ global TIME_OUT_SECOND TIME_OUT_SECOND = seconds
seconds: float. To make this available, you need explicitly import uiautomation: from uiautomation import uiautomation as auto auto.SetGlobalSearchTimeout(10)
SetGlobalSearchTimeout
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def WalkTree(top, getChildren: Callable[[TreeNode], List[TreeNode]] = None, getFirstChild: Callable[[TreeNode], TreeNode] = None, getNextSibling: Callable[[TreeNode], TreeNode] = None, yieldCondition: Callable[[TreeNode, int], bool] = None, includeTop: bool = False, maxDepth: int = 0xFFFFFFFF)...
Walk a tree not using recursive algorithm. top: a tree node. getChildren: Callable[[TreeNode], List[TreeNode]], function(treeNode: TreeNode) -> List[TreeNode]. getNextSibling: Callable[[TreeNode], TreeNode], function(treeNode: TreeNode) -> TreeNode. getNextSibling: Callable[[TreeNode], TreeNode], f...
WalkTree
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def ControlFromCursor() -> Control: """ Call ControlFromPoint with current cursor point. Return `Control` subclass. """ x, y = GetCursorPos() return ControlFromPoint(x, y)
Call ControlFromPoint with current cursor point. Return `Control` subclass.
ControlFromCursor
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def ControlFromCursor2() -> Control: """ Call ControlFromPoint2 with current cursor point. Return `Control` subclass. """ x, y = GetCursorPos() return ControlFromPoint2(x, y)
Call ControlFromPoint2 with current cursor point. Return `Control` subclass.
ControlFromCursor2
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def WalkControl(control: Control, includeTop: bool = False, maxDepth: int = 0xFFFFFFFF): """ control: `Control` or its subclass. includeTop: bool, if True, yield (control, 0) first. maxDepth: int, enum depth. Yield 2 items tuple (control: Control, depth: int). """ if includeTop: yiel...
control: `Control` or its subclass. includeTop: bool, if True, yield (control, 0) first. maxDepth: int, enum depth. Yield 2 items tuple (control: Control, depth: int).
WalkControl
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def LogControl(control: Control, depth: int = 0, showAllName: bool = True, showPid: bool = False) -> None: """ Print and log control's properties. control: `Control` or its subclass. depth: int, current depth. showAllName: bool, if False, print the first 30 characters of control.Name. """ de...
Print and log control's properties. control: `Control` or its subclass. depth: int, current depth. showAllName: bool, if False, print the first 30 characters of control.Name.
LogControl
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def EnumAndLogControl(control: Control, maxDepth: int = 0xFFFFFFFF, showAllName: bool = True, showPid: bool = False, startDepth: int = 0) -> None: """ Print and log control and its descendants' propertyies. control: `Control` or its subclass. maxDepth: int, enum depth. showAllName: bool, if False, p...
Print and log control and its descendants' propertyies. control: `Control` or its subclass. maxDepth: int, enum depth. showAllName: bool, if False, print the first 30 characters of control.Name. startDepth: int, control's current depth.
EnumAndLogControl
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def EnumAndLogControlAncestors(control: Control, showAllName: bool = True, showPid: bool = False) -> None: """ Print and log control and its ancestors' propertyies. control: `Control` or its subclass. showAllName: bool, if False, print the first 30 characters of control.Name. """ lists = [] ...
Print and log control and its ancestors' propertyies. control: `Control` or its subclass. showAllName: bool, if False, print the first 30 characters of control.Name.
EnumAndLogControlAncestors
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def FindControl(control: Control, compare: Callable[[Control, int], bool], maxDepth: int = 0xFFFFFFFF, findFromSelf: bool = False, foundIndex: int = 1) -> Control: """ control: `Control` or its subclass. compare: Callable[[Control, int], bool], function(control: Control, depth: int) -> bool. maxDepth: i...
control: `Control` or its subclass. compare: Callable[[Control, int], bool], function(control: Control, depth: int) -> bool. maxDepth: int, enum depth. findFromSelf: bool, if False, do not compare self. foundIndex: int, starts with 1, >= 1. Return `Control` subclass or None if not find.
FindControl
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def WaitHotKeyReleased(hotkey: Tuple[int, int]) -> None: """hotkey: Tuple[int, int], two ints tuple (modifierKey, key)""" mod = {ModifierKey.Alt: Keys.VK_MENU, ModifierKey.Control: Keys.VK_CONTROL, ModifierKey.Shift: Keys.VK_SHIFT, ModifierKey.Win: Keys.VK_LWIN ...
hotkey: Tuple[int, int], two ints tuple (modifierKey, key)
WaitHotKeyReleased
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def RunByHotKey(keyFunctions: Dict[Tuple[int, int], Callable], stopHotKey: Tuple[int, int] = None, exitHotKey: Tuple[int, int] = (ModifierKey.Control, Keys.VK_D), waitHotKeyReleased: bool = True) -> None: """ Bind functions with hotkeys, the function will be run or stopped in another thread when the hotkey is p...
Bind functions with hotkeys, the function will be run or stopped in another thread when the hotkey is pressed. keyFunctions: Dict[Tuple[int, int], Callable], such as {(uiautomation.ModifierKey.Control, uiautomation.Keys.VK_1) : function} stopHotKey: hotkey tuple exitHotKey: hotkey tuple waitHotKeyR...
RunByHotKey
python
cluic/wxauto
wxauto/uiautomation.py
https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py
Apache-2.0
def check_setuptools_features(): """Check if setuptools is up to date.""" import pkg_resources try: list(pkg_resources.parse_requirements('foo~=1.0')) except ValueError: sys.exit('Your Python distribution comes with an incompatible version ' 'of `setuptools`. Please run:...
Check if setuptools is up to date.
check_setuptools_features
python
bigchaindb/bigchaindb
setup.py
https://github.com/bigchaindb/bigchaindb/blob/master/setup.py
Apache-2.0
def map_leafs(func, mapping): """Map a function to the leafs of a mapping.""" def _inner(mapping, path=None): if path is None: path = [] for key, val in mapping.items(): if isinstance(val, collections.abc.Mapping): _inner(val, path + [key]) e...
Map a function to the leafs of a mapping.
map_leafs
python
bigchaindb/bigchaindb
bigchaindb/config_utils.py
https://github.com/bigchaindb/bigchaindb/blob/master/bigchaindb/config_utils.py
Apache-2.0
def update(d, u): """Recursively update a mapping (i.e. a dict, list, set, or tuple). Conceptually, d and u are two sets trees (with nodes and edges). This function goes through all the nodes of u. For each node in u, if d doesn't have that node yet, then this function adds the node from u, otherwi...
Recursively update a mapping (i.e. a dict, list, set, or tuple). Conceptually, d and u are two sets trees (with nodes and edges). This function goes through all the nodes of u. For each node in u, if d doesn't have that node yet, then this function adds the node from u, otherwise this function overwrit...
update
python
bigchaindb/bigchaindb
bigchaindb/config_utils.py
https://github.com/bigchaindb/bigchaindb/blob/master/bigchaindb/config_utils.py
Apache-2.0
def file_config(filename=None): """Returns the config values found in a configuration file. Args: filename (str): the JSON file with the configuration values. If ``None``, CONFIG_DEFAULT_PATH will be used. Returns: dict: The config values in the specified config file (or the ...
Returns the config values found in a configuration file. Args: filename (str): the JSON file with the configuration values. If ``None``, CONFIG_DEFAULT_PATH will be used. Returns: dict: The config values in the specified config file (or the file at CONFIG_DEFAULT_PATH...
file_config
python
bigchaindb/bigchaindb
bigchaindb/config_utils.py
https://github.com/bigchaindb/bigchaindb/blob/master/bigchaindb/config_utils.py
Apache-2.0
def env_config(config): """Return a new configuration with the values found in the environment. The function recursively iterates over the config, checking if there is a matching env variable. If an env variable is found, the func updates the configuration with that value. The name of the env vari...
Return a new configuration with the values found in the environment. The function recursively iterates over the config, checking if there is a matching env variable. If an env variable is found, the func updates the configuration with that value. The name of the env variable is built combining a prefi...
env_config
python
bigchaindb/bigchaindb
bigchaindb/config_utils.py
https://github.com/bigchaindb/bigchaindb/blob/master/bigchaindb/config_utils.py
Apache-2.0