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 __init__(self, typ, name=None, coercible_types=None):
"""
`typ` should be a Python type. `coercible_types` is a list of
additional accepted types. However, the final value will be
coerced to `typ`.
`name` is an optional name. By default, a name will be derived
from `... |
`typ` should be a Python type. `coercible_types` is a list of
additional accepted types. However, the final value will be
coerced to `typ`.
`name` is an optional name. By default, a name will be derived
from `typ`.
| __init__ | python | hyperdiv/hyperdiv | hyperdiv/prop_types/native.py | https://github.com/hyperdiv/hyperdiv/blob/master/hyperdiv/prop_types/native.py | Apache-2.0 |
def test_click_twice():
"""
Test that an update batch containing updates to the same prop
schedules those updates in different frames.
"""
button_key = None
text_key = None
def my_app():
nonlocal button_key, text_key
s = state(count=0)
b = button("Click Me")
... |
Test that an update batch containing updates to the same prop
schedules those updates in different frames.
| test_click_twice | python | hyperdiv/hyperdiv | hyperdiv/tests/app_runner_tests.py | https://github.com/hyperdiv/hyperdiv/blob/master/hyperdiv/tests/app_runner_tests.py | Apache-2.0 |
def instance(cls) -> '_AutomationClient':
"""Singleton instance (this prevents com creation on import)."""
if cls._instance is None:
cls._instance = cls()
return cls._instance | Singleton instance (this prevents com creation on import). | instance | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SetClipboardText(text: str) -> bool:
"""
Return bool, True if succeed otherwise False.
"""
if ctypes.windll.user32.OpenClipboard(0):
ctypes.windll.user32.EmptyClipboard()
textByteLen = (len(text) + 1) * 2
hClipboardData = ctypes.windll.kernel32.GlobalAlloc(0, textByteLen) # ... |
Return bool, True if succeed otherwise False.
| SetClipboardText | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SetConsoleColor(color: int) -> bool:
"""
Change the text color on console window.
color: int, a value in class `ConsoleColor`.
Return bool, True if succeed otherwise False.
"""
global _ConsoleOutputHandle
global _DefaultConsoleColor
if not _DefaultConsoleColor:
if not _Consol... |
Change the text color on console window.
color: int, a value in class `ConsoleColor`.
Return bool, True if succeed otherwise False.
| SetConsoleColor | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def ResetConsoleColor() -> bool:
"""
Reset to the default text color on console window.
Return bool, True if succeed otherwise False.
"""
if sys.stdout:
sys.stdout.flush()
return bool(ctypes.windll.kernel32.SetConsoleTextAttribute(_ConsoleOutputHandle, ctypes.c_ushort(_DefaultConsoleColo... |
Reset to the default text color on console window.
Return bool, True if succeed otherwise False.
| ResetConsoleColor | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetCursorPos() -> Tuple[int, int]:
"""
GetCursorPos from Win32.
Get current mouse cursor positon.
Return Tuple[int, int], two ints tuple (x, y).
"""
point = ctypes.wintypes.POINT(0, 0)
ctypes.windll.user32.GetCursorPos(ctypes.byref(point))
return point.x, point.y |
GetCursorPos from Win32.
Get current mouse cursor positon.
Return Tuple[int, int], two ints tuple (x, y).
| GetCursorPos | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def Click(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate mouse click at point x, y.
x: int.
y: int.
waitTime: float.
"""
SetCursorPos(x, y)
screenWidth, screenHeight = GetScreenSize()
mouse_event(MouseEventFlag.LeftDown | MouseEventFlag.Absolute, x * 655... |
Simulate mouse click at point x, y.
x: int.
y: int.
waitTime: float.
| Click | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def MiddleClick(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate mouse middle click at point x, y.
x: int.
y: int.
waitTime: float.
"""
SetCursorPos(x, y)
screenWidth, screenHeight = GetScreenSize()
mouse_event(MouseEventFlag.MiddleDown | MouseEventFlag.Ab... |
Simulate mouse middle click at point x, y.
x: int.
y: int.
waitTime: float.
| MiddleClick | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def RightClick(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate mouse right click at point x, y.
x: int.
y: int.
waitTime: float.
"""
SetCursorPos(x, y)
screenWidth, screenHeight = GetScreenSize()
mouse_event(MouseEventFlag.RightDown | MouseEventFlag.Absol... |
Simulate mouse right click at point x, y.
x: int.
y: int.
waitTime: float.
| RightClick | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def PressMouse(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Press left mouse.
x: int.
y: int.
waitTime: float.
"""
SetCursorPos(x, y)
screenWidth, screenHeight = GetScreenSize()
mouse_event(MouseEventFlag.LeftDown | MouseEventFlag.Absolute, x * 65535 // screenW... |
Press left mouse.
x: int.
y: int.
waitTime: float.
| PressMouse | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def RightPressMouse(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Press right mouse.
x: int.
y: int.
waitTime: float.
"""
SetCursorPos(x, y)
screenWidth, screenHeight = GetScreenSize()
mouse_event(MouseEventFlag.RightDown | MouseEventFlag.Absolute, x * 65535 // ... |
Press right mouse.
x: int.
y: int.
waitTime: float.
| RightPressMouse | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def MiddlePressMouse(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Press middle mouse.
x: int.
y: int.
waitTime: float.
"""
SetCursorPos(x, y)
screenWidth, screenHeight = GetScreenSize()
mouse_event(MouseEventFlag.MiddleDown | MouseEventFlag.Absolute, x * 65535 ... |
Press middle mouse.
x: int.
y: int.
waitTime: float.
| MiddlePressMouse | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def MoveTo(x: int, y: int, moveSpeed: float = 1, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate mouse move to point x, y from current cursor.
x: int.
y: int.
moveSpeed: float, 1 normal speed, < 1 move slower, > 1 move faster.
waitTime: float.
"""
if moveSpeed <= 0:
... |
Simulate mouse move to point x, y from current cursor.
x: int.
y: int.
moveSpeed: float, 1 normal speed, < 1 move slower, > 1 move faster.
waitTime: float.
| MoveTo | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def DragDrop(x1: int, y1: int, x2: int, y2: int, moveSpeed: float = 1, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate mouse left button drag from point x1, y1 drop to point x2, y2.
x1: int.
y1: int.
x2: int.
y2: int.
moveSpeed: float, 1 normal speed, < 1 move slower, > 1 move f... |
Simulate mouse left button drag from point x1, y1 drop to point x2, y2.
x1: int.
y1: int.
x2: int.
y2: int.
moveSpeed: float, 1 normal speed, < 1 move slower, > 1 move faster.
waitTime: float.
| DragDrop | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def RightDragDrop(x1: int, y1: int, x2: int, y2: int, moveSpeed: float = 1, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate mouse right button drag from point x1, y1 drop to point x2, y2.
x1: int.
y1: int.
x2: int.
y2: int.
moveSpeed: float, 1 normal speed, < 1 move slower, > 1 ... |
Simulate mouse right button drag from point x1, y1 drop to point x2, y2.
x1: int.
y1: int.
x2: int.
y2: int.
moveSpeed: float, 1 normal speed, < 1 move slower, > 1 move faster.
waitTime: float.
| RightDragDrop | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def MiddleDragDrop(x1: int, y1: int, x2: int, y2: int, moveSpeed: float = 1, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate mouse middle button drag from point x1, y1 drop to point x2, y2.
x1: int.
y1: int.
x2: int.
y2: int.
moveSpeed: float, 1 normal speed, < 1 move slower, > ... |
Simulate mouse middle button drag from point x1, y1 drop to point x2, y2.
x1: int.
y1: int.
x2: int.
y2: int.
moveSpeed: float, 1 normal speed, < 1 move slower, > 1 move faster.
waitTime: float.
| MiddleDragDrop | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def WheelDown(wheelTimes: int = 1, interval: float = 0.05, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate mouse wheel down.
wheelTimes: int.
interval: float.
waitTime: float.
"""
for i in range(wheelTimes):
mouse_event(MouseEventFlag.Wheel, 0, 0, -120, 0) #WHEEL_DELT... |
Simulate mouse wheel down.
wheelTimes: int.
interval: float.
waitTime: float.
| WheelDown | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def WheelUp(wheelTimes: int = 1, interval: float = 0.05, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate mouse wheel up.
wheelTimes: int.
interval: float.
waitTime: float.
"""
for i in range(wheelTimes):
mouse_event(MouseEventFlag.Wheel, 0, 0, 120, 0) #WHEEL_DELTA=120
... |
Simulate mouse wheel up.
wheelTimes: int.
interval: float.
waitTime: float.
| WheelUp | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SetDpiAwareness(dpiAwarenessPerMonitor: bool = True) -> int:
'''
Call SetThreadDpiAwarenessContext(Windows 10 version 1607+) or SetProcessDpiAwareness(Windows 8.1+).
You should call this function with True if you enable DPI scaling. uiautomation calls this function when it initializes.
dpiAwarenessP... |
Call SetThreadDpiAwarenessContext(Windows 10 version 1607+) or SetProcessDpiAwareness(Windows 8.1+).
You should call this function with True if you enable DPI scaling. uiautomation calls this function when it initializes.
dpiAwarenessPerMonitor: bool.
Return int.
| SetDpiAwareness | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetScreenSize(dpiAwarenessPerMonitor: bool = True) -> Tuple[int, int]:
"""
dpiAwarenessPerMonitor: bool.
Return Tuple[int, int], two ints tuple (width, height).
"""
SetDpiAwareness(dpiAwarenessPerMonitor)
SM_CXSCREEN = 0
SM_CYSCREEN = 1
w = ctypes.windll.user32.GetSystemMetrics(SM_CX... |
dpiAwarenessPerMonitor: bool.
Return Tuple[int, int], two ints tuple (width, height).
| GetScreenSize | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetMonitorsRect(dpiAwarenessPerMonitor: bool = False) -> List[Rect]:
"""
Get monitors' rect.
dpiAwarenessPerMonitor: bool.
Return List[Rect].
"""
SetDpiAwareness(dpiAwarenessPerMonitor)
MonitorEnumProc = ctypes.WINFUNCTYPE(ctypes.c_int, ctypes.c_size_t, ctypes.c_size_t, ctypes.POINTER(ct... |
Get monitors' rect.
dpiAwarenessPerMonitor: bool.
Return List[Rect].
| GetMonitorsRect | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetPixelColor(x: int, y: int, handle: int = 0) -> int:
"""
Get pixel color of a native window.
x: int.
y: int.
handle: int, the handle of a native window.
Return int, the bgr value of point (x,y).
r = bgr & 0x0000FF
g = (bgr & 0x00FF00) >> 8
b = (bgr & 0xFF0000) >> 16
If hand... |
Get pixel color of a native window.
x: int.
y: int.
handle: int, the handle of a native window.
Return int, the bgr value of point (x,y).
r = bgr & 0x0000FF
g = (bgr & 0x00FF00) >> 8
b = (bgr & 0xFF0000) >> 16
If handle is 0, get pixel from Desktop window(root control).
Note:
... | GetPixelColor | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SetWindowTopmost(handle: int, isTopmost: bool) -> bool:
"""
handle: int, the handle of a native window.
isTopmost: bool
Return bool, True if succeed otherwise False.
"""
topValue = SWP.HWND_Topmost if isTopmost else SWP.HWND_NoTopmost
return bool(SetWindowPos(handle, topValue, 0, 0, 0, 0... |
handle: int, the handle of a native window.
isTopmost: bool
Return bool, True if succeed otherwise False.
| SetWindowTopmost | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetWindowText(handle: int) -> str:
"""
GetWindowText from Win32.
handle: int, the handle of a native window.
Return str.
"""
arrayType = ctypes.c_wchar * MAX_PATH
values = arrayType()
ctypes.windll.user32.GetWindowTextW(ctypes.c_void_p(handle), values, ctypes.c_int(MAX_PATH))
ret... |
GetWindowText from Win32.
handle: int, the handle of a native window.
Return str.
| GetWindowText | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetEditText(handle: int) -> str:
"""
Get text of a native Win32 Edit.
handle: int, the handle of a native window.
Return str.
"""
textLen = SendMessage(handle, 0x000E, 0, 0) + 1 #WM_GETTEXTLENGTH
arrayType = ctypes.c_wchar * textLen
values = arrayType()
SendMessage(handle, 0x000... |
Get text of a native Win32 Edit.
handle: int, the handle of a native window.
Return str.
| GetEditText | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetConsoleOriginalTitle() -> str:
"""
GetConsoleOriginalTitle from Win32.
Return str.
Only available on Windows Vista or higher.
"""
if IsNT6orHigher:
arrayType = ctypes.c_wchar * MAX_PATH
values = arrayType()
ctypes.windll.kernel32.GetConsoleOriginalTitleW(values, ct... |
GetConsoleOriginalTitle from Win32.
Return str.
Only available on Windows Vista or higher.
| GetConsoleOriginalTitle | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def IsDesktopLocked() -> bool:
"""
Check if desktop is locked.
Return bool.
Desktop is locked if press Win+L, Ctrl+Alt+Del or in remote desktop mode.
"""
isLocked = False
desk = ctypes.windll.user32.OpenDesktopW(ctypes.c_wchar_p('Default'), ctypes.c_uint(0), ctypes.c_int(0), ctypes.c_uint(0x... |
Check if desktop is locked.
Return bool.
Desktop is locked if press Win+L, Ctrl+Alt+Del or in remote desktop mode.
| IsDesktopLocked | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def PlayWaveFile(filePath: str = r'C:\Windows\Media\notify.wav', isAsync: bool = False, isLoop: bool = False) -> bool:
"""
Call PlaySound from Win32.
filePath: str, if emtpy, stop playing the current sound.
isAsync: bool, if True, the sound is played asynchronously and returns immediately.
isLoop: b... |
Call PlaySound from Win32.
filePath: str, if emtpy, stop playing the current sound.
isAsync: bool, if True, the sound is played asynchronously and returns immediately.
isLoop: bool, if True, the sound plays repeatedly until PlayWaveFile(None) is called again, must also set isAsync to True.
Return b... | PlayWaveFile | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def IsProcess64Bit(processId: int) -> bool:
"""
Return True if process is 64 bit.
Return False if process is 32 bit.
Return None if unknown, maybe caused by having no acess right to the process.
"""
try:
func = ctypes.windll.ntdll.ZwWow64ReadVirtualMemory64 #only 64 bit OS has this func... |
Return True if process is 64 bit.
Return False if process is 32 bit.
Return None if unknown, maybe caused by having no acess right to the process.
| IsProcess64Bit | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def RunScriptAsAdmin(argv: List[str], workingDirectory: str = None, showFlag: int = SW.ShowNormal) -> bool:
"""
Run a python script as administrator.
System will show a popup dialog askes you whether to elevate as administrator if UAC is enabled.
argv: List[str], a str list like sys.argv, argv[0] is the... |
Run a python script as administrator.
System will show a popup dialog askes you whether to elevate as administrator if UAC is enabled.
argv: List[str], a str list like sys.argv, argv[0] is the script file, argv[1:] are other arguments.
workingDirectory: str, the working directory for the script file.
... | RunScriptAsAdmin | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SendKey(key: int, waitTime: float = OPERATION_WAIT_TIME) -> None:
"""
Simulate typing a key.
key: int, a value in class `Keys`.
"""
keybd_event(key, 0, KeyboardEventFlag.KeyDown | KeyboardEventFlag.ExtendedKey, 0)
keybd_event(key, 0, KeyboardEventFlag.KeyUp | KeyboardEventFlag.ExtendedKey, 0... |
Simulate typing a key.
key: int, a value in class `Keys`.
| SendKey | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def IsKeyPressed(key: int) -> bool:
"""
key: int, a value in class `Keys`.
Return bool.
"""
state = ctypes.windll.user32.GetAsyncKeyState(key)
return bool(state & 0x8000) |
key: int, a value in class `Keys`.
Return bool.
| IsKeyPressed | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def _CreateInput(structure) -> INPUT:
"""
Create Win32 struct `INPUT` for `SendInput`.
Return `INPUT`.
"""
if isinstance(structure, MOUSEINPUT):
return INPUT(InputType.Mouse, _INPUTUnion(mi=structure))
if isinstance(structure, KEYBDINPUT):
return INPUT(InputType.Keyboard, _INPUTU... |
Create Win32 struct `INPUT` for `SendInput`.
Return `INPUT`.
| _CreateInput | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SendInput(*inputs) -> int:
"""
SendInput from Win32.
input: `INPUT`.
Return int, the number of events that it successfully inserted into the keyboard or mouse input stream.
If the function returns zero, the input was already blocked by another thread.
"""
cbSize = ctypes.c_in... |
SendInput from Win32.
input: `INPUT`.
Return int, the number of events that it successfully inserted into the keyboard or mouse input stream.
If the function returns zero, the input was already blocked by another thread.
| SendInput | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SendUnicodeChar(char: str, charMode: bool = True) -> int:
"""
Type a single unicode char.
char: str, len(char) must equal to 1.
charMode: bool, if False, the char typied is depend on the input method if a input method is on.
Return int, the number of events that it successfully inserted into the... |
Type a single unicode char.
char: str, len(char) must equal to 1.
charMode: bool, if False, the char typied is depend on the input method if a input method is on.
Return int, the number of events that it successfully inserted into the keyboard or mouse input stream.
If the function retu... | SendUnicodeChar | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def _VKtoSC(key: int) -> int:
"""
This function is only for internal use in SendKeys.
key: int, a value in class `Keys`.
Return int.
"""
if key in _SCKeys:
return _SCKeys[key]
scanCode = ctypes.windll.user32.MapVirtualKeyA(key, 0)
if not scanCode:
return 0
keyList = [... |
This function is only for internal use in SendKeys.
key: int, a value in class `Keys`.
Return int.
| _VKtoSC | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SendKeys(text: str, interval: float = 0.01, waitTime: float = OPERATION_WAIT_TIME, charMode: bool = True, debug: bool = False) -> None:
"""
Simulate typing keys on keyboard.
text: str, keys to type.
interval: float, seconds between keys.
waitTime: float.
charMode: bool, if False, the text ty... |
Simulate typing keys on keyboard.
text: str, keys to type.
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.
debug: bool, if True, print the keys.
Examples:
{Ctrl}, {Delete} ... are sp... | SendKeys | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def Write(log: Any, consoleColor: int = ConsoleColor.Default, writeToFile: bool = True, printToStdout: bool = True, logFile: str = None, printTruncateLen: int = 0) -> None:
"""
log: any type.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFil... |
log: any type.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.
printTruncateLen: int, if <= 0, log is not truncated when print.
| Write | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def ColorfullyWrite(log: str, consoleColor: int = -1, writeToFile: bool = True, printToStdout: bool = True, logFile: str = None) -> None:
"""
log: str.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
... |
log: str.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.
ColorfullyWrite('Hello <Color=Green>Green</Color> !!!'), color name must be in Logger.ColorNames.
| ColorfullyWrite | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def Log(log: Any = '', consoleColor: int = -1, writeToFile: bool = True, printToStdout: bool = True, logFile: str = None) -> None:
"""
log: any type.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
... |
log: any type.
consoleColor: int, a value in class `ConsoleColor`, such as `ConsoleColor.DarkGreen`.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.
| Log | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def ColorfullyLog(log: str = '', consoleColor: int = -1, writeToFile: bool = True, printToStdout: bool = True, logFile: str = None) -> None:
"""
log: any type.
consoleColor: int, a value in class ConsoleColor, such as ConsoleColor.DarkGreen.
writeToFile: bool.
printToStdout: bool... |
log: any type.
consoleColor: int, a value in class ConsoleColor, such as ConsoleColor.DarkGreen.
writeToFile: bool.
printToStdout: bool.
logFile: str, log file path.
ColorfullyLog('Hello <Color=Green>Green</Color> !!!'), color name must be in Logger.ColorNames
| ColorfullyLog | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def __init__(self, width: int = 0, height: int = 0):
"""
Create a black bimap of size(width, height).
"""
self._width = width
self._height = height
self._bitmap = 0
if width > 0 and height > 0:
self._bitmap = _DllClient.instance().dll.BitmapCreate(widt... |
Create a black bimap of size(width, height).
| __init__ | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def FromHandle(self, hwnd: int, left: int = 0, top: int = 0, right: int = 0, bottom: int = 0) -> bool:
"""
Capture a native window to Bitmap by its handle.
hwnd: int, the handle of a native window.
left: int.
top: int.
right: int.
bottom: int.
left, top, r... |
Capture a native window to Bitmap by its handle.
hwnd: int, the handle of a native window.
left: int.
top: int.
right: int.
bottom: int.
left, top, right and bottom are control's internal postion(from 0,0).
Return bool, True if succeed otherwise False.
... | FromHandle | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def FromControl(self, control: 'Control', x: int = 0, y: int = 0, width: int = 0, height: int = 0) -> bool:
"""
Capture a control to Bitmap.
control: `Control` or its subclass.
x: int.
y: int.
width: int.
height: int.
x, y: the point in control's internal ... |
Capture a control to Bitmap.
control: `Control` or its subclass.
x: int.
y: int.
width: int.
height: int.
x, y: the point in control's internal position(from 0,0)
width, height: image's width and height from x, y, use 0 for entire area,
If width(o... | FromControl | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def FromFile(self, filePath: str) -> bool:
"""
Load image from a file.
filePath: str.
Return bool, True if succeed otherwise False.
"""
self.Release()
self._bitmap = _DllClient.instance().dll.BitmapFromFile(ctypes.c_wchar_p(filePath))
self._getsize()
... |
Load image from a file.
filePath: str.
Return bool, True if succeed otherwise False.
| FromFile | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def ToFile(self, savePath: str) -> bool:
"""
Save to a file.
savePath: str, should end with .bmp, .jpg, .jpeg, .png, .gif, .tif, .tiff.
Return bool, True if succeed otherwise False.
"""
name, ext = os.path.splitext(savePath)
extMap = {'.bmp': 'image/bmp'
... |
Save to a file.
savePath: str, should end with .bmp, .jpg, .jpeg, .png, .gif, .tif, .tiff.
Return bool, True if succeed otherwise False.
| ToFile | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetPixelColorsHorizontally(self, x: int, y: int, count: int) -> ctypes.Array:
"""
x: int.
y: int.
count: int.
Return `ctypes.Array`, an iterable array of int values in argb form point x,y horizontally.
"""
arrayType = ctypes.c_uint32 * count
values = a... |
x: int.
y: int.
count: int.
Return `ctypes.Array`, an iterable array of int values in argb form point x,y horizontally.
| GetPixelColorsHorizontally | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SetPixelColorsHorizontally(self, x: int, y: int, colors: Iterable[int]) -> bool:
"""
Set pixel colors form x,y horizontally.
x: int.
y: int.
colors: Iterable[int], an iterable list of int color values in argb.
Return bool, True if succeed otherwise False.
"""
... |
Set pixel colors form x,y horizontally.
x: int.
y: int.
colors: Iterable[int], an iterable list of int color values in argb.
Return bool, True if succeed otherwise False.
| SetPixelColorsHorizontally | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetPixelColorsVertically(self, x: int, y: int, count: int) -> ctypes.Array:
"""
x: int.
y: int.
count: int.
Return `ctypes.Array`, an iterable array of int values in argb form point x,y vertically.
"""
arrayType = ctypes.c_uint32 * count
values = array... |
x: int.
y: int.
count: int.
Return `ctypes.Array`, an iterable array of int values in argb form point x,y vertically.
| GetPixelColorsVertically | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SetPixelColorsVertically(self, x: int, y: int, colors: Iterable[int]) -> bool:
"""
Set pixel colors form x,y vertically.
x: int.
y: int.
colors: Iterable[int], an iterable list of int color values in argb.
Return bool, True if succeed otherwise False.
"""
... |
Set pixel colors form x,y vertically.
x: int.
y: int.
colors: Iterable[int], an iterable list of int color values in argb.
Return bool, True if succeed otherwise False.
| SetPixelColorsVertically | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetPixelColorsOfRect(self, x: int, y: int, width: int, height: int) -> ctypes.Array:
"""
x: int.
y: int.
width: int.
height: int.
Return `ctypes.Array`, an iterable array of int values in argb of the input rect.
"""
arrayType = ctypes.c_uint32 * (width... |
x: int.
y: int.
width: int.
height: int.
Return `ctypes.Array`, an iterable array of int values in argb of the input rect.
| GetPixelColorsOfRect | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SetPixelColorsOfRect(self, x: int, y: int, width: int, height: int, colors: Iterable[int]) -> bool:
"""
x: int.
y: int.
width: int.
height: int.
colors: Iterable[int], an iterable list of int values in argb, it's length must equal to width*height.
Return bool.... |
x: int.
y: int.
width: int.
height: int.
colors: Iterable[int], an iterable list of int values in argb, it's length must equal to width*height.
Return bool.
| SetPixelColorsOfRect | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetPixelColorsOfRects(self, rects: List[Tuple[int, int, int, int]]) -> List[ctypes.Array]:
"""
rects: List[Tuple[int, int, int, int]], such as [(0,0,10,10), (10,10,20,20), (x,y,width,height)].
Return List[ctypes.Array], a list whose elements are ctypes.Array which is an iterable array of int... |
rects: List[Tuple[int, int, int, int]], such as [(0,0,10,10), (10,10,20,20), (x,y,width,height)].
Return List[ctypes.Array], a list whose elements are ctypes.Array which is an iterable array of int values in argb.
| GetPixelColorsOfRects | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetSubBitmap(self, x: int, y: int, width: int, height: int) -> 'Bitmap':
"""
x: int.
y: int.
width: int.
height: int.
Return `Bitmap`, a sub bitmap of the input rect.
"""
colors = self.GetPixelColorsOfRect(x, y, width, height)
bitmap = Bitmap(w... |
x: int.
y: int.
width: int.
height: int.
Return `Bitmap`, a sub bitmap of the input rect.
| GetSubBitmap | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetPatternIdInterface(patternId: int):
"""
Get pattern COM interface by pattern id.
patternId: int, a value in class `PatternId`.
Return comtypes._cominterface_meta.
"""
global _PatternIdInterfaces
if not _PatternIdInterfaces:
_PatternIdInterfaces = {
# PatternId.Anno... |
Get pattern COM interface by pattern id.
patternId: int, a value in class `PatternId`.
Return comtypes._cominterface_meta.
| GetPatternIdInterface | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SetDockPosition(self, dockPosition: int, waitTime: float = OPERATION_WAIT_TIME) -> int:
"""
Call IUIAutomationDockPattern::SetDockPosition.
dockPosition: int, a value in class `DockPosition`.
waitTime: float.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautoma... |
Call IUIAutomationDockPattern::SetDockPosition.
dockPosition: int, a value in class `DockPosition`.
waitTime: float.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationdockpattern-setdockposition
| SetDockPosition | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def GetGrabbedItems(self) -> List['Control']:
"""
Call IUIAutomationDragPattern::GetCurrentGrabbedItems.
Return List[Control], a list of `Control` subclasses that represent the full set of items
that the user is dragging as part of a drag operation.
Refer https://doc... |
Call IUIAutomationDragPattern::GetCurrentGrabbedItems.
Return List[Control], a list of `Control` subclasses that represent the full set of items
that the user is dragging as part of a drag operation.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationcli... | GetGrabbedItems | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def Collapse(self, waitTime: float = OPERATION_WAIT_TIME) -> bool:
"""
Call IUIAutomationExpandCollapsePattern::Collapse.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationcl... |
Call IUIAutomationExpandCollapsePattern::Collapse.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationexpandcollapsepattern-collapse
| Collapse | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def Expand(self, waitTime: float = OPERATION_WAIT_TIME) -> bool:
"""
Call IUIAutomationExpandCollapsePattern::Expand.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient... |
Call IUIAutomationExpandCollapsePattern::Expand.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationexpandcollapsepattern-expand
| Expand | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def Invoke(self, waitTime: float = OPERATION_WAIT_TIME) -> bool:
"""
Call IUIAutomationInvokePattern::Invoke.
Invoke the action of a control, such as a button click.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/wind... |
Call IUIAutomationInvokePattern::Invoke.
Invoke the action of a control, such as a button click.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationinvoke... | Invoke | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def DoDefaultAction(self, waitTime: float = OPERATION_WAIT_TIME) -> bool:
"""
Call IUIAutomationLegacyIAccessiblePattern::DoDefaultAction.
Perform the Microsoft Active Accessibility default action for the element.
waitTime: float.
Return bool, True if succeed otherwise False.
... |
Call IUIAutomationLegacyIAccessiblePattern::DoDefaultAction.
Perform the Microsoft Active Accessibility default action for the element.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf... | DoDefaultAction | 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 IUIAutomationLegacyIAccessiblePattern::GetCurrentSelection.
Return List[Control], a list of `Control` subclasses,
the Microsoft Active Accessibility property that identifies the selected children of this element.
Re... |
Call IUIAutomationLegacyIAccessiblePattern::GetCurrentSelection.
Return List[Control], a list of `Control` subclasses,
the Microsoft Active Accessibility property that identifies the selected children of this element.
Refer https://docs.microsoft.com/en-us/windows/desktop/a... | GetSelection | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def Select(self, flagsSelect: int, waitTime: float = OPERATION_WAIT_TIME) -> bool:
"""
Call IUIAutomationLegacyIAccessiblePattern::Select.
Perform a Microsoft Active Accessibility selection.
flagsSelect: int, a value in `AccessibleSelection`.
waitTime: float.
Return bool,... |
Call IUIAutomationLegacyIAccessiblePattern::Select.
Perform a Microsoft Active Accessibility selection.
flagsSelect: int, a value in `AccessibleSelection`.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/deskt... | Select | 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 IUIAutomationLegacyIAccessiblePattern::SetValue.
Set the Microsoft Active Accessibility value property for the element.
value: str.
waitTime: float.
Return bool, True if succeed otherw... |
Call IUIAutomationLegacyIAccessiblePattern::SetValue.
Set the Microsoft Active Accessibility value property for the element.
value: str.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomation... | SetValue | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def SetValue(self, value: float, waitTime: float = OPERATION_WAIT_TIME) -> bool:
"""
Call IUIAutomationRangeValuePattern::SetValue.
Set the value of the control.
value: int.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsof... |
Call IUIAutomationRangeValuePattern::SetValue.
Set the value of the control.
value: int.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationrangev... | SetValue | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
def ScrollIntoView(self, waitTime: float = OPERATION_WAIT_TIME) -> bool:
"""
Call IUIAutomationScrollItemPattern::ScrollIntoView.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiauto... |
Call IUIAutomationScrollItemPattern::ScrollIntoView.
waitTime: float.
Return bool, True if succeed otherwise False.
Refer https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationscrollitempattern-scrollintoview
| ScrollIntoView | python | cluic/wxauto | wxauto/uiautomation.py | https://github.com/cluic/wxauto/blob/master/wxauto/uiautomation.py | Apache-2.0 |
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.