windows-mcp 0.5.7__py3-none-any.whl → 0.5.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1963 @@
1
+ """
2
+ uiautomation for Python 3.
3
+ Author: yinkaisheng
4
+ Source: https://github.com/yinkaisheng/Python-UIAutomation-for-Windows
5
+
6
+ This module is for UIAutomation on Windows(Windows XP with SP3, Windows Vista and Windows 7/8/8.1/10).
7
+ It supports UIAutomation for the applications which implmented IUIAutomation, such as MFC, Windows Form, WPF, Modern UI(Metro UI), Qt, Firefox and Chrome.
8
+ Run 'automation.py -h' for help.
9
+
10
+ uiautomation is shared under the Apache Licene 2.0.
11
+ This means that the code can be freely copied and distributed, and costs nothing to use.
12
+ """
13
+
14
+ import os
15
+ import sys
16
+ import time
17
+ import datetime
18
+ import re
19
+ import shlex
20
+ import struct
21
+ import atexit
22
+ import threading
23
+ import ctypes
24
+ import ctypes.wintypes
25
+ import comtypes
26
+ from enum import IntEnum, IntFlag
27
+ from io import TextIOWrapper
28
+ from typing import (Any, Callable, Dict, Generator, List, Tuple, Optional, Union, Sequence)
29
+
30
+
31
+ METRO_WINDOW_CLASS_NAME = 'Windows.UI.Core.CoreWindow' # for Windows 8 and 8.1
32
+ SEARCH_INTERVAL = 0.5 # search control interval seconds
33
+ MAX_MOVE_SECOND = 1 # simulate mouse move or drag max seconds
34
+ TIME_OUT_SECOND = 10
35
+ OPERATION_WAIT_TIME = 0.5
36
+ MAX_PATH = 260
37
+ DEBUG_SEARCH_TIME = False
38
+ DEBUG_EXIST_DISAPPEAR = False
39
+ S_OK = 0
40
+
41
+ IsPy38OrHigher = sys.version_info[:2] >= (3, 8)
42
+ IsNT6orHigher = os.sys.getwindowsversion().major >= 6
43
+ CurrentProcessIs64Bit = sys.maxsize > 0xFFFFFFFF
44
+ ProcessTime = time.perf_counter # this returns nearly 0 when first call it if python version <= 3.6
45
+ ProcessTime() # need to call it once if python version <= 3.6
46
+ TreeNode = Any
47
+
48
+ class ControlType:
49
+ """
50
+ ControlType from IUIAutomation.
51
+ Refer https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-controltype-ids
52
+ """
53
+ AppBarControl = 50040
54
+ ButtonControl = 50000
55
+ CalendarControl = 50001
56
+ CheckBoxControl = 50002
57
+ ComboBoxControl = 50003
58
+ CustomControl = 50025
59
+ DataGridControl = 50028
60
+ DataItemControl = 50029
61
+ DocumentControl = 50030
62
+ EditControl = 50004
63
+ GroupControl = 50026
64
+ HeaderControl = 50034
65
+ HeaderItemControl = 50035
66
+ HyperlinkControl = 50005
67
+ ImageControl = 50006
68
+ ListControl = 50008
69
+ ListItemControl = 50007
70
+ MenuBarControl = 50010
71
+ MenuControl = 50009
72
+ MenuItemControl = 50011
73
+ PaneControl = 50033
74
+ ProgressBarControl = 50012
75
+ RadioButtonControl = 50013
76
+ ScrollBarControl = 50014
77
+ SemanticZoomControl = 50039
78
+ SeparatorControl = 50038
79
+ SliderControl = 50015
80
+ SpinnerControl = 50016
81
+ SplitButtonControl = 50031
82
+ StatusBarControl = 50017
83
+ TabControl = 50018
84
+ TabItemControl = 50019
85
+ TableControl = 50036
86
+ TextControl = 50020
87
+ ThumbControl = 50027
88
+ TitleBarControl = 50037
89
+ ToolBarControl = 50021
90
+ ToolTipControl = 50022
91
+ TreeControl = 50023
92
+ TreeItemControl = 50024
93
+ WindowControl = 50032
94
+
95
+
96
+ ControlTypeNames = {
97
+ ControlType.AppBarControl: 'AppBarControl',
98
+ ControlType.ButtonControl: 'ButtonControl',
99
+ ControlType.CalendarControl: 'CalendarControl',
100
+ ControlType.CheckBoxControl: 'CheckBoxControl',
101
+ ControlType.ComboBoxControl: 'ComboBoxControl',
102
+ ControlType.CustomControl: 'CustomControl',
103
+ ControlType.DataGridControl: 'DataGridControl',
104
+ ControlType.DataItemControl: 'DataItemControl',
105
+ ControlType.DocumentControl: 'DocumentControl',
106
+ ControlType.EditControl: 'EditControl',
107
+ ControlType.GroupControl: 'GroupControl',
108
+ ControlType.HeaderControl: 'HeaderControl',
109
+ ControlType.HeaderItemControl: 'HeaderItemControl',
110
+ ControlType.HyperlinkControl: 'HyperlinkControl',
111
+ ControlType.ImageControl: 'ImageControl',
112
+ ControlType.ListControl: 'ListControl',
113
+ ControlType.ListItemControl: 'ListItemControl',
114
+ ControlType.MenuBarControl: 'MenuBarControl',
115
+ ControlType.MenuControl: 'MenuControl',
116
+ ControlType.MenuItemControl: 'MenuItemControl',
117
+ ControlType.PaneControl: 'PaneControl',
118
+ ControlType.ProgressBarControl: 'ProgressBarControl',
119
+ ControlType.RadioButtonControl: 'RadioButtonControl',
120
+ ControlType.ScrollBarControl: 'ScrollBarControl',
121
+ ControlType.SemanticZoomControl: 'SemanticZoomControl',
122
+ ControlType.SeparatorControl: 'SeparatorControl',
123
+ ControlType.SliderControl: 'SliderControl',
124
+ ControlType.SpinnerControl: 'SpinnerControl',
125
+ ControlType.SplitButtonControl: 'SplitButtonControl',
126
+ ControlType.StatusBarControl: 'StatusBarControl',
127
+ ControlType.TabControl: 'TabControl',
128
+ ControlType.TabItemControl: 'TabItemControl',
129
+ ControlType.TableControl: 'TableControl',
130
+ ControlType.TextControl: 'TextControl',
131
+ ControlType.ThumbControl: 'ThumbControl',
132
+ ControlType.TitleBarControl: 'TitleBarControl',
133
+ ControlType.ToolBarControl: 'ToolBarControl',
134
+ ControlType.ToolTipControl: 'ToolTipControl',
135
+ ControlType.TreeControl: 'TreeControl',
136
+ ControlType.TreeItemControl: 'TreeItemControl',
137
+ ControlType.WindowControl: 'WindowControl',
138
+ }
139
+
140
+
141
+ class PatternId:
142
+ """
143
+ PatternId from IUIAutomation.
144
+ Refer https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-controlpattern-ids
145
+ """
146
+ AnnotationPattern = 10023
147
+ CustomNavigationPattern = 10033
148
+ DockPattern = 10011
149
+ DragPattern = 10030
150
+ DropTargetPattern = 10031
151
+ ExpandCollapsePattern = 10005
152
+ GridItemPattern = 10007
153
+ GridPattern = 10006
154
+ InvokePattern = 10000
155
+ ItemContainerPattern = 10019
156
+ LegacyIAccessiblePattern = 10018
157
+ MultipleViewPattern = 10008
158
+ ObjectModelPattern = 10022
159
+ RangeValuePattern = 10003
160
+ ScrollItemPattern = 10017
161
+ ScrollPattern = 10004
162
+ SelectionItemPattern = 10010
163
+ SelectionPattern = 10001
164
+ SpreadsheetItemPattern = 10027
165
+ SpreadsheetPattern = 10026
166
+ StylesPattern = 10025
167
+ SynchronizedInputPattern = 10021
168
+ TableItemPattern = 10013
169
+ TablePattern = 10012
170
+ TextChildPattern = 10029
171
+ TextEditPattern = 10032
172
+ TextPattern = 10014
173
+ TextPattern2 = 10024
174
+ TogglePattern = 10015
175
+ TransformPattern = 10016
176
+ TransformPattern2 = 10028
177
+ ValuePattern = 10002
178
+ VirtualizedItemPattern = 10020
179
+ WindowPattern = 10009
180
+ SelectionPattern2 = 10034
181
+
182
+
183
+ PatternIdNames = {
184
+ PatternId.AnnotationPattern: 'AnnotationPattern',
185
+ PatternId.CustomNavigationPattern: 'CustomNavigationPattern',
186
+ PatternId.DockPattern: 'DockPattern',
187
+ PatternId.DragPattern: 'DragPattern',
188
+ PatternId.DropTargetPattern: 'DropTargetPattern',
189
+ PatternId.ExpandCollapsePattern: 'ExpandCollapsePattern',
190
+ PatternId.GridItemPattern: 'GridItemPattern',
191
+ PatternId.GridPattern: 'GridPattern',
192
+ PatternId.InvokePattern: 'InvokePattern',
193
+ PatternId.ItemContainerPattern: 'ItemContainerPattern',
194
+ PatternId.LegacyIAccessiblePattern: 'LegacyIAccessiblePattern',
195
+ PatternId.MultipleViewPattern: 'MultipleViewPattern',
196
+ PatternId.ObjectModelPattern: 'ObjectModelPattern',
197
+ PatternId.RangeValuePattern: 'RangeValuePattern',
198
+ PatternId.ScrollItemPattern: 'ScrollItemPattern',
199
+ PatternId.ScrollPattern: 'ScrollPattern',
200
+ PatternId.SelectionItemPattern: 'SelectionItemPattern',
201
+ PatternId.SelectionPattern: 'SelectionPattern',
202
+ PatternId.SpreadsheetItemPattern: 'SpreadsheetItemPattern',
203
+ PatternId.SpreadsheetPattern: 'SpreadsheetPattern',
204
+ PatternId.StylesPattern: 'StylesPattern',
205
+ PatternId.SynchronizedInputPattern: 'SynchronizedInputPattern',
206
+ PatternId.TableItemPattern: 'TableItemPattern',
207
+ PatternId.TablePattern: 'TablePattern',
208
+ PatternId.TextChildPattern: 'TextChildPattern',
209
+ PatternId.TextEditPattern: 'TextEditPattern',
210
+ PatternId.TextPattern: 'TextPattern',
211
+ PatternId.TextPattern2: 'TextPattern2',
212
+ PatternId.TogglePattern: 'TogglePattern',
213
+ PatternId.TransformPattern: 'TransformPattern',
214
+ PatternId.TransformPattern2: 'TransformPattern2',
215
+ PatternId.ValuePattern: 'ValuePattern',
216
+ PatternId.VirtualizedItemPattern: 'VirtualizedItemPattern',
217
+ PatternId.WindowPattern: 'WindowPattern',
218
+ PatternId.SelectionPattern2: 'SelectionPattern2',
219
+ }
220
+
221
+
222
+ class PropertyId:
223
+ """
224
+ PropertyId from IUIAutomation.
225
+ Refer https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-automation-element-propids
226
+ Refer https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-control-pattern-propids
227
+ """
228
+ AcceleratorKeyProperty = 30006
229
+ AccessKeyProperty = 30007
230
+ AnnotationAnnotationTypeIdProperty = 30113
231
+ AnnotationAnnotationTypeNameProperty = 30114
232
+ AnnotationAuthorProperty = 30115
233
+ AnnotationDateTimeProperty = 30116
234
+ AnnotationObjectsProperty = 30156
235
+ AnnotationTargetProperty = 30117
236
+ AnnotationTypesProperty = 30155
237
+ AriaPropertiesProperty = 30102
238
+ AriaRoleProperty = 30101
239
+ AutomationIdProperty = 30011
240
+ BoundingRectangleProperty = 30001
241
+ CenterPointProperty = 30165
242
+ ClassNameProperty = 30012
243
+ ClickablePointProperty = 30014
244
+ ControlTypeProperty = 30003
245
+ ControllerForProperty = 30104
246
+ CultureProperty = 30015
247
+ DescribedByProperty = 30105
248
+ DockDockPositionProperty = 30069
249
+ DragDropEffectProperty = 30139
250
+ DragDropEffectsProperty = 30140
251
+ DragGrabbedItemsProperty = 30144
252
+ DragIsGrabbedProperty = 30138
253
+ DropTargetDropTargetEffectProperty = 30142
254
+ DropTargetDropTargetEffectsProperty = 30143
255
+ ExpandCollapseExpandCollapseStateProperty = 30070
256
+ FillColorProperty = 30160
257
+ FillTypeProperty = 30162
258
+ FlowsFromProperty = 30148
259
+ FlowsToProperty = 30106
260
+ FrameworkIdProperty = 30024
261
+ FullDescriptionProperty = 30159
262
+ GridColumnCountProperty = 30063
263
+ GridItemColumnProperty = 30065
264
+ GridItemColumnSpanProperty = 30067
265
+ GridItemContainingGridProperty = 30068
266
+ GridItemRowProperty = 30064
267
+ GridItemRowSpanProperty = 30066
268
+ GridRowCountProperty = 30062
269
+ HasKeyboardFocusProperty = 30008
270
+ HelpTextProperty = 30013
271
+ IsAnnotationPatternAvailableProperty = 30118
272
+ IsContentElementProperty = 30017
273
+ IsControlElementProperty = 30016
274
+ IsCustomNavigationPatternAvailableProperty = 30151
275
+ IsDataValidForFormProperty = 30103
276
+ IsDockPatternAvailableProperty = 30027
277
+ IsDragPatternAvailableProperty = 30137
278
+ IsDropTargetPatternAvailableProperty = 30141
279
+ IsEnabledProperty = 30010
280
+ IsExpandCollapsePatternAvailableProperty = 30028
281
+ IsGridItemPatternAvailableProperty = 30029
282
+ IsGridPatternAvailableProperty = 30030
283
+ IsInvokePatternAvailableProperty = 30031
284
+ IsItemContainerPatternAvailableProperty = 30108
285
+ IsKeyboardFocusableProperty = 30009
286
+ IsLegacyIAccessiblePatternAvailableProperty = 30090
287
+ IsMultipleViewPatternAvailableProperty = 30032
288
+ IsObjectModelPatternAvailableProperty = 30112
289
+ IsOffscreenProperty = 30022
290
+ IsPasswordProperty = 30019
291
+ IsPeripheralProperty = 30150
292
+ IsRangeValuePatternAvailableProperty = 30033
293
+ IsRequiredForFormProperty = 30025
294
+ IsScrollItemPatternAvailableProperty = 30035
295
+ IsScrollPatternAvailableProperty = 30034
296
+ IsSelectionItemPatternAvailableProperty = 30036
297
+ IsSelectionPattern2AvailableProperty = 30168
298
+ IsSelectionPatternAvailableProperty = 30037
299
+ IsSpreadsheetItemPatternAvailableProperty = 30132
300
+ IsSpreadsheetPatternAvailableProperty = 30128
301
+ IsStylesPatternAvailableProperty = 30127
302
+ IsSynchronizedInputPatternAvailableProperty = 30110
303
+ IsTableItemPatternAvailableProperty = 30039
304
+ IsTablePatternAvailableProperty = 30038
305
+ IsTextChildPatternAvailableProperty = 30136
306
+ IsTextEditPatternAvailableProperty = 30149
307
+ IsTextPattern2AvailableProperty = 30119
308
+ IsTextPatternAvailableProperty = 30040
309
+ IsTogglePatternAvailableProperty = 30041
310
+ IsTransformPattern2AvailableProperty = 30134
311
+ IsTransformPatternAvailableProperty = 30042
312
+ IsValuePatternAvailableProperty = 30043
313
+ IsVirtualizedItemPatternAvailableProperty = 30109
314
+ IsWindowPatternAvailableProperty = 30044
315
+ ItemStatusProperty = 30026
316
+ ItemTypeProperty = 30021
317
+ LabeledByProperty = 30018
318
+ LandmarkTypeProperty = 30157
319
+ LegacyIAccessibleChildIdProperty = 30091
320
+ LegacyIAccessibleDefaultActionProperty = 30100
321
+ LegacyIAccessibleDescriptionProperty = 30094
322
+ LegacyIAccessibleHelpProperty = 30097
323
+ LegacyIAccessibleKeyboardShortcutProperty = 30098
324
+ LegacyIAccessibleNameProperty = 30092
325
+ LegacyIAccessibleRoleProperty = 30095
326
+ LegacyIAccessibleSelectionProperty = 30099
327
+ LegacyIAccessibleStateProperty = 30096
328
+ LegacyIAccessibleValueProperty = 30093
329
+ LevelProperty = 30154
330
+ LiveSettingProperty = 30135
331
+ LocalizedControlTypeProperty = 30004
332
+ LocalizedLandmarkTypeProperty = 30158
333
+ MultipleViewCurrentViewProperty = 30071
334
+ MultipleViewSupportedViewsProperty = 30072
335
+ NameProperty = 30005
336
+ NativeWindowHandleProperty = 30020
337
+ OptimizeForVisualContentProperty = 30111
338
+ OrientationProperty = 30023
339
+ OutlineColorProperty = 30161
340
+ OutlineThicknessProperty = 30164
341
+ PositionInSetProperty = 30152
342
+ ProcessIdProperty = 30002
343
+ ProviderDescriptionProperty = 30107
344
+ RangeValueIsReadOnlyProperty = 30048
345
+ RangeValueLargeChangeProperty = 30051
346
+ RangeValueMaximumProperty = 30050
347
+ RangeValueMinimumProperty = 30049
348
+ RangeValueSmallChangeProperty = 30052
349
+ RangeValueValueProperty = 30047
350
+ RotationProperty = 30166
351
+ RuntimeIdProperty = 30000
352
+ ScrollHorizontalScrollPercentProperty = 30053
353
+ ScrollHorizontalViewSizeProperty = 30054
354
+ ScrollHorizontallyScrollableProperty = 30057
355
+ ScrollVerticalScrollPercentProperty = 30055
356
+ ScrollVerticalViewSizeProperty = 30056
357
+ ScrollVerticallyScrollableProperty = 30058
358
+ Selection2CurrentSelectedItemProperty = 30171
359
+ Selection2FirstSelectedItemProperty = 30169
360
+ Selection2ItemCountProperty = 30172
361
+ Selection2LastSelectedItemProperty = 30170
362
+ SelectionCanSelectMultipleProperty = 30060
363
+ SelectionIsSelectionRequiredProperty = 30061
364
+ SelectionItemIsSelectedProperty = 30079
365
+ SelectionItemSelectionContainerProperty = 30080
366
+ SelectionSelectionProperty = 30059
367
+ SizeOfSetProperty = 30153
368
+ SizeProperty = 30167
369
+ SpreadsheetItemAnnotationObjectsProperty = 30130
370
+ SpreadsheetItemAnnotationTypesProperty = 30131
371
+ SpreadsheetItemFormulaProperty = 30129
372
+ StylesExtendedPropertiesProperty = 30126
373
+ StylesFillColorProperty = 30122
374
+ StylesFillPatternColorProperty = 30125
375
+ StylesFillPatternStyleProperty = 30123
376
+ StylesShapeProperty = 30124
377
+ StylesStyleIdProperty = 30120
378
+ StylesStyleNameProperty = 30121
379
+ TableColumnHeadersProperty = 30082
380
+ TableItemColumnHeaderItemsProperty = 30085
381
+ TableItemRowHeaderItemsProperty = 30084
382
+ TableRowHeadersProperty = 30081
383
+ TableRowOrColumnMajorProperty = 30083
384
+ ToggleToggleStateProperty = 30086
385
+ Transform2CanZoomProperty = 30133
386
+ Transform2ZoomLevelProperty = 30145
387
+ Transform2ZoomMaximumProperty = 30147
388
+ Transform2ZoomMinimumProperty = 30146
389
+ TransformCanMoveProperty = 30087
390
+ TransformCanResizeProperty = 30088
391
+ TransformCanRotateProperty = 30089
392
+ ValueIsReadOnlyProperty = 30046
393
+ ValueValueProperty = 30045
394
+ VisualEffectsProperty = 30163
395
+ WindowCanMaximizeProperty = 30073
396
+ WindowCanMinimizeProperty = 30074
397
+ WindowIsModalProperty = 30077
398
+ WindowIsTopmostProperty = 30078
399
+ WindowWindowInteractionStateProperty = 30076
400
+ WindowWindowVisualStateProperty = 30075
401
+
402
+
403
+ PropertyIdNames = {
404
+ PropertyId.AcceleratorKeyProperty: 'AcceleratorKeyProperty',
405
+ PropertyId.AccessKeyProperty: 'AccessKeyProperty',
406
+ PropertyId.AnnotationAnnotationTypeIdProperty: 'AnnotationAnnotationTypeIdProperty',
407
+ PropertyId.AnnotationAnnotationTypeNameProperty: 'AnnotationAnnotationTypeNameProperty',
408
+ PropertyId.AnnotationAuthorProperty: 'AnnotationAuthorProperty',
409
+ PropertyId.AnnotationDateTimeProperty: 'AnnotationDateTimeProperty',
410
+ PropertyId.AnnotationObjectsProperty: 'AnnotationObjectsProperty',
411
+ PropertyId.AnnotationTargetProperty: 'AnnotationTargetProperty',
412
+ PropertyId.AnnotationTypesProperty: 'AnnotationTypesProperty',
413
+ PropertyId.AriaPropertiesProperty: 'AriaPropertiesProperty',
414
+ PropertyId.AriaRoleProperty: 'AriaRoleProperty',
415
+ PropertyId.AutomationIdProperty: 'AutomationIdProperty',
416
+ PropertyId.BoundingRectangleProperty: 'BoundingRectangleProperty',
417
+ PropertyId.CenterPointProperty: 'CenterPointProperty',
418
+ PropertyId.ClassNameProperty: 'ClassNameProperty',
419
+ PropertyId.ClickablePointProperty: 'ClickablePointProperty',
420
+ PropertyId.ControlTypeProperty: 'ControlTypeProperty',
421
+ PropertyId.ControllerForProperty: 'ControllerForProperty',
422
+ PropertyId.CultureProperty: 'CultureProperty',
423
+ PropertyId.DescribedByProperty: 'DescribedByProperty',
424
+ PropertyId.DockDockPositionProperty: 'DockDockPositionProperty',
425
+ PropertyId.DragDropEffectProperty: 'DragDropEffectProperty',
426
+ PropertyId.DragDropEffectsProperty: 'DragDropEffectsProperty',
427
+ PropertyId.DragGrabbedItemsProperty: 'DragGrabbedItemsProperty',
428
+ PropertyId.DragIsGrabbedProperty: 'DragIsGrabbedProperty',
429
+ PropertyId.DropTargetDropTargetEffectProperty: 'DropTargetDropTargetEffectProperty',
430
+ PropertyId.DropTargetDropTargetEffectsProperty: 'DropTargetDropTargetEffectsProperty',
431
+ PropertyId.ExpandCollapseExpandCollapseStateProperty: 'ExpandCollapseExpandCollapseStateProperty',
432
+ PropertyId.FillColorProperty: 'FillColorProperty',
433
+ PropertyId.FillTypeProperty: 'FillTypeProperty',
434
+ PropertyId.FlowsFromProperty: 'FlowsFromProperty',
435
+ PropertyId.FlowsToProperty: 'FlowsToProperty',
436
+ PropertyId.FrameworkIdProperty: 'FrameworkIdProperty',
437
+ PropertyId.FullDescriptionProperty: 'FullDescriptionProperty',
438
+ PropertyId.GridColumnCountProperty: 'GridColumnCountProperty',
439
+ PropertyId.GridItemColumnProperty: 'GridItemColumnProperty',
440
+ PropertyId.GridItemColumnSpanProperty: 'GridItemColumnSpanProperty',
441
+ PropertyId.GridItemContainingGridProperty: 'GridItemContainingGridProperty',
442
+ PropertyId.GridItemRowProperty: 'GridItemRowProperty',
443
+ PropertyId.GridItemRowSpanProperty: 'GridItemRowSpanProperty',
444
+ PropertyId.GridRowCountProperty: 'GridRowCountProperty',
445
+ PropertyId.HasKeyboardFocusProperty: 'HasKeyboardFocusProperty',
446
+ PropertyId.HelpTextProperty: 'HelpTextProperty',
447
+ PropertyId.IsAnnotationPatternAvailableProperty: 'IsAnnotationPatternAvailableProperty',
448
+ PropertyId.IsContentElementProperty: 'IsContentElementProperty',
449
+ PropertyId.IsControlElementProperty: 'IsControlElementProperty',
450
+ PropertyId.IsCustomNavigationPatternAvailableProperty: 'IsCustomNavigationPatternAvailableProperty',
451
+ PropertyId.IsDataValidForFormProperty: 'IsDataValidForFormProperty',
452
+ PropertyId.IsDockPatternAvailableProperty: 'IsDockPatternAvailableProperty',
453
+ PropertyId.IsDragPatternAvailableProperty: 'IsDragPatternAvailableProperty',
454
+ PropertyId.IsDropTargetPatternAvailableProperty: 'IsDropTargetPatternAvailableProperty',
455
+ PropertyId.IsEnabledProperty: 'IsEnabledProperty',
456
+ PropertyId.IsExpandCollapsePatternAvailableProperty: 'IsExpandCollapsePatternAvailableProperty',
457
+ PropertyId.IsGridItemPatternAvailableProperty: 'IsGridItemPatternAvailableProperty',
458
+ PropertyId.IsGridPatternAvailableProperty: 'IsGridPatternAvailableProperty',
459
+ PropertyId.IsInvokePatternAvailableProperty: 'IsInvokePatternAvailableProperty',
460
+ PropertyId.IsItemContainerPatternAvailableProperty: 'IsItemContainerPatternAvailableProperty',
461
+ PropertyId.IsKeyboardFocusableProperty: 'IsKeyboardFocusableProperty',
462
+ PropertyId.IsLegacyIAccessiblePatternAvailableProperty: 'IsLegacyIAccessiblePatternAvailableProperty',
463
+ PropertyId.IsMultipleViewPatternAvailableProperty: 'IsMultipleViewPatternAvailableProperty',
464
+ PropertyId.IsObjectModelPatternAvailableProperty: 'IsObjectModelPatternAvailableProperty',
465
+ PropertyId.IsOffscreenProperty: 'IsOffscreenProperty',
466
+ PropertyId.IsPasswordProperty: 'IsPasswordProperty',
467
+ PropertyId.IsPeripheralProperty: 'IsPeripheralProperty',
468
+ PropertyId.IsRangeValuePatternAvailableProperty: 'IsRangeValuePatternAvailableProperty',
469
+ PropertyId.IsRequiredForFormProperty: 'IsRequiredForFormProperty',
470
+ PropertyId.IsScrollItemPatternAvailableProperty: 'IsScrollItemPatternAvailableProperty',
471
+ PropertyId.IsScrollPatternAvailableProperty: 'IsScrollPatternAvailableProperty',
472
+ PropertyId.IsSelectionItemPatternAvailableProperty: 'IsSelectionItemPatternAvailableProperty',
473
+ PropertyId.IsSelectionPattern2AvailableProperty: 'IsSelectionPattern2AvailableProperty',
474
+ PropertyId.IsSelectionPatternAvailableProperty: 'IsSelectionPatternAvailableProperty',
475
+ PropertyId.IsSpreadsheetItemPatternAvailableProperty: 'IsSpreadsheetItemPatternAvailableProperty',
476
+ PropertyId.IsSpreadsheetPatternAvailableProperty: 'IsSpreadsheetPatternAvailableProperty',
477
+ PropertyId.IsStylesPatternAvailableProperty: 'IsStylesPatternAvailableProperty',
478
+ PropertyId.IsSynchronizedInputPatternAvailableProperty: 'IsSynchronizedInputPatternAvailableProperty',
479
+ PropertyId.IsTableItemPatternAvailableProperty: 'IsTableItemPatternAvailableProperty',
480
+ PropertyId.IsTablePatternAvailableProperty: 'IsTablePatternAvailableProperty',
481
+ PropertyId.IsTextChildPatternAvailableProperty: 'IsTextChildPatternAvailableProperty',
482
+ PropertyId.IsTextEditPatternAvailableProperty: 'IsTextEditPatternAvailableProperty',
483
+ PropertyId.IsTextPattern2AvailableProperty: 'IsTextPattern2AvailableProperty',
484
+ PropertyId.IsTextPatternAvailableProperty: 'IsTextPatternAvailableProperty',
485
+ PropertyId.IsTogglePatternAvailableProperty: 'IsTogglePatternAvailableProperty',
486
+ PropertyId.IsTransformPattern2AvailableProperty: 'IsTransformPattern2AvailableProperty',
487
+ PropertyId.IsTransformPatternAvailableProperty: 'IsTransformPatternAvailableProperty',
488
+ PropertyId.IsValuePatternAvailableProperty: 'IsValuePatternAvailableProperty',
489
+ PropertyId.IsVirtualizedItemPatternAvailableProperty: 'IsVirtualizedItemPatternAvailableProperty',
490
+ PropertyId.IsWindowPatternAvailableProperty: 'IsWindowPatternAvailableProperty',
491
+ PropertyId.ItemStatusProperty: 'ItemStatusProperty',
492
+ PropertyId.ItemTypeProperty: 'ItemTypeProperty',
493
+ PropertyId.LabeledByProperty: 'LabeledByProperty',
494
+ PropertyId.LandmarkTypeProperty: 'LandmarkTypeProperty',
495
+ PropertyId.LegacyIAccessibleChildIdProperty: 'LegacyIAccessibleChildIdProperty',
496
+ PropertyId.LegacyIAccessibleDefaultActionProperty: 'LegacyIAccessibleDefaultActionProperty',
497
+ PropertyId.LegacyIAccessibleDescriptionProperty: 'LegacyIAccessibleDescriptionProperty',
498
+ PropertyId.LegacyIAccessibleHelpProperty: 'LegacyIAccessibleHelpProperty',
499
+ PropertyId.LegacyIAccessibleKeyboardShortcutProperty: 'LegacyIAccessibleKeyboardShortcutProperty',
500
+ PropertyId.LegacyIAccessibleNameProperty: 'LegacyIAccessibleNameProperty',
501
+ PropertyId.LegacyIAccessibleRoleProperty: 'LegacyIAccessibleRoleProperty',
502
+ PropertyId.LegacyIAccessibleSelectionProperty: 'LegacyIAccessibleSelectionProperty',
503
+ PropertyId.LegacyIAccessibleStateProperty: 'LegacyIAccessibleStateProperty',
504
+ PropertyId.LegacyIAccessibleValueProperty: 'LegacyIAccessibleValueProperty',
505
+ PropertyId.LevelProperty: 'LevelProperty',
506
+ PropertyId.LiveSettingProperty: 'LiveSettingProperty',
507
+ PropertyId.LocalizedControlTypeProperty: 'LocalizedControlTypeProperty',
508
+ PropertyId.LocalizedLandmarkTypeProperty: 'LocalizedLandmarkTypeProperty',
509
+ PropertyId.MultipleViewCurrentViewProperty: 'MultipleViewCurrentViewProperty',
510
+ PropertyId.MultipleViewSupportedViewsProperty: 'MultipleViewSupportedViewsProperty',
511
+ PropertyId.NameProperty: 'NameProperty',
512
+ PropertyId.NativeWindowHandleProperty: 'NativeWindowHandleProperty',
513
+ PropertyId.OptimizeForVisualContentProperty: 'OptimizeForVisualContentProperty',
514
+ PropertyId.OrientationProperty: 'OrientationProperty',
515
+ PropertyId.OutlineColorProperty: 'OutlineColorProperty',
516
+ PropertyId.OutlineThicknessProperty: 'OutlineThicknessProperty',
517
+ PropertyId.PositionInSetProperty: 'PositionInSetProperty',
518
+ PropertyId.ProcessIdProperty: 'ProcessIdProperty',
519
+ PropertyId.ProviderDescriptionProperty: 'ProviderDescriptionProperty',
520
+ PropertyId.RangeValueIsReadOnlyProperty: 'RangeValueIsReadOnlyProperty',
521
+ PropertyId.RangeValueLargeChangeProperty: 'RangeValueLargeChangeProperty',
522
+ PropertyId.RangeValueMaximumProperty: 'RangeValueMaximumProperty',
523
+ PropertyId.RangeValueMinimumProperty: 'RangeValueMinimumProperty',
524
+ PropertyId.RangeValueSmallChangeProperty: 'RangeValueSmallChangeProperty',
525
+ PropertyId.RangeValueValueProperty: 'RangeValueValueProperty',
526
+ PropertyId.RotationProperty: 'RotationProperty',
527
+ PropertyId.RuntimeIdProperty: 'RuntimeIdProperty',
528
+ PropertyId.ScrollHorizontalScrollPercentProperty: 'ScrollHorizontalScrollPercentProperty',
529
+ PropertyId.ScrollHorizontalViewSizeProperty: 'ScrollHorizontalViewSizeProperty',
530
+ PropertyId.ScrollHorizontallyScrollableProperty: 'ScrollHorizontallyScrollableProperty',
531
+ PropertyId.ScrollVerticalScrollPercentProperty: 'ScrollVerticalScrollPercentProperty',
532
+ PropertyId.ScrollVerticalViewSizeProperty: 'ScrollVerticalViewSizeProperty',
533
+ PropertyId.ScrollVerticallyScrollableProperty: 'ScrollVerticallyScrollableProperty',
534
+ PropertyId.Selection2CurrentSelectedItemProperty: 'Selection2CurrentSelectedItemProperty',
535
+ PropertyId.Selection2FirstSelectedItemProperty: 'Selection2FirstSelectedItemProperty',
536
+ PropertyId.Selection2ItemCountProperty: 'Selection2ItemCountProperty',
537
+ PropertyId.Selection2LastSelectedItemProperty: 'Selection2LastSelectedItemProperty',
538
+ PropertyId.SelectionCanSelectMultipleProperty: 'SelectionCanSelectMultipleProperty',
539
+ PropertyId.SelectionIsSelectionRequiredProperty: 'SelectionIsSelectionRequiredProperty',
540
+ PropertyId.SelectionItemIsSelectedProperty: 'SelectionItemIsSelectedProperty',
541
+ PropertyId.SelectionItemSelectionContainerProperty: 'SelectionItemSelectionContainerProperty',
542
+ PropertyId.SelectionSelectionProperty: 'SelectionSelectionProperty',
543
+ PropertyId.SizeOfSetProperty: 'SizeOfSetProperty',
544
+ PropertyId.SizeProperty: 'SizeProperty',
545
+ PropertyId.SpreadsheetItemAnnotationObjectsProperty: 'SpreadsheetItemAnnotationObjectsProperty',
546
+ PropertyId.SpreadsheetItemAnnotationTypesProperty: 'SpreadsheetItemAnnotationTypesProperty',
547
+ PropertyId.SpreadsheetItemFormulaProperty: 'SpreadsheetItemFormulaProperty',
548
+ PropertyId.StylesExtendedPropertiesProperty: 'StylesExtendedPropertiesProperty',
549
+ PropertyId.StylesFillColorProperty: 'StylesFillColorProperty',
550
+ PropertyId.StylesFillPatternColorProperty: 'StylesFillPatternColorProperty',
551
+ PropertyId.StylesFillPatternStyleProperty: 'StylesFillPatternStyleProperty',
552
+ PropertyId.StylesShapeProperty: 'StylesShapeProperty',
553
+ PropertyId.StylesStyleIdProperty: 'StylesStyleIdProperty',
554
+ PropertyId.StylesStyleNameProperty: 'StylesStyleNameProperty',
555
+ PropertyId.TableColumnHeadersProperty: 'TableColumnHeadersProperty',
556
+ PropertyId.TableItemColumnHeaderItemsProperty: 'TableItemColumnHeaderItemsProperty',
557
+ PropertyId.TableItemRowHeaderItemsProperty: 'TableItemRowHeaderItemsProperty',
558
+ PropertyId.TableRowHeadersProperty: 'TableRowHeadersProperty',
559
+ PropertyId.TableRowOrColumnMajorProperty: 'TableRowOrColumnMajorProperty',
560
+ PropertyId.ToggleToggleStateProperty: 'ToggleToggleStateProperty',
561
+ PropertyId.Transform2CanZoomProperty: 'Transform2CanZoomProperty',
562
+ PropertyId.Transform2ZoomLevelProperty: 'Transform2ZoomLevelProperty',
563
+ PropertyId.Transform2ZoomMaximumProperty: 'Transform2ZoomMaximumProperty',
564
+ PropertyId.Transform2ZoomMinimumProperty: 'Transform2ZoomMinimumProperty',
565
+ PropertyId.TransformCanMoveProperty: 'TransformCanMoveProperty',
566
+ PropertyId.TransformCanResizeProperty: 'TransformCanResizeProperty',
567
+ PropertyId.TransformCanRotateProperty: 'TransformCanRotateProperty',
568
+ PropertyId.ValueIsReadOnlyProperty: 'ValueIsReadOnlyProperty',
569
+ PropertyId.ValueValueProperty: 'ValueValueProperty',
570
+ PropertyId.VisualEffectsProperty: 'VisualEffectsProperty',
571
+ PropertyId.WindowCanMaximizeProperty: 'WindowCanMaximizeProperty',
572
+ PropertyId.WindowCanMinimizeProperty: 'WindowCanMinimizeProperty',
573
+ PropertyId.WindowIsModalProperty: 'WindowIsModalProperty',
574
+ PropertyId.WindowIsTopmostProperty: 'WindowIsTopmostProperty',
575
+ PropertyId.WindowWindowInteractionStateProperty: 'WindowWindowInteractionStateProperty',
576
+ PropertyId.WindowWindowVisualStateProperty: 'WindowWindowVisualStateProperty',
577
+ }
578
+
579
+
580
+ class AccessibleRole:
581
+ """
582
+ AccessibleRole from IUIAutomation.
583
+ Refer https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.accessiblerole?view=netframework-4.8
584
+ """
585
+ TitleBar = 0x1
586
+ MenuBar = 0x2
587
+ ScrollBar = 0x3
588
+ Grip = 0x4
589
+ Sound = 0x5
590
+ Cursor = 0x6
591
+ Caret = 0x7
592
+ Alert = 0x8
593
+ Window = 0x9
594
+ Client = 0xa
595
+ MenuPopup = 0xb
596
+ MenuItem = 0xc
597
+ ToolTip = 0xd
598
+ Application = 0xe
599
+ Document = 0xf
600
+ Pane = 0x10
601
+ Chart = 0x11
602
+ Dialog = 0x12
603
+ Border = 0x13
604
+ Grouping = 0x14
605
+ Separator = 0x15
606
+ Toolbar = 0x16
607
+ StatusBar = 0x17
608
+ Table = 0x18
609
+ ColumnHeader = 0x19
610
+ RowHeader = 0x1a
611
+ Column = 0x1b
612
+ Row = 0x1c
613
+ Cell = 0x1d
614
+ Link = 0x1e
615
+ HelpBalloon = 0x1f
616
+ Character = 0x20
617
+ List = 0x21
618
+ ListItem = 0x22
619
+ Outline = 0x23
620
+ OutlineItem = 0x24
621
+ PageTab = 0x25
622
+ PropertyPage = 0x26
623
+ Indicator = 0x27
624
+ Graphic = 0x28
625
+ StaticText = 0x29
626
+ Text = 0x2a
627
+ PushButton = 0x2b
628
+ CheckButton = 0x2c
629
+ RadioButton = 0x2d
630
+ ComboBox = 0x2e
631
+ DropList = 0x2f
632
+ ProgressBar = 0x30
633
+ Dial = 0x31
634
+ HotkeyField = 0x32
635
+ Slider = 0x33
636
+ SpinButton = 0x34
637
+ Diagram = 0x35
638
+ Animation = 0x36
639
+ Equation = 0x37
640
+ ButtonDropDown = 0x38
641
+ ButtonMenu = 0x39
642
+ ButtonDropDownGrid = 0x3a
643
+ WhiteSpace = 0x3b
644
+ PageTabList = 0x3c
645
+ Clock = 0x3d
646
+ SplitButton = 0x3e
647
+ IpAddress = 0x3f
648
+ OutlineButton = 0x40
649
+
650
+ AccessibleRoleNames = {v: k for k, v in AccessibleRole.__dict__.items() if not k.startswith('_')}
651
+
652
+
653
+ class AccessibleState():
654
+ """
655
+ AccessibleState from IUIAutomation.
656
+ Refer https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.accessiblestates?view=netframework-4.8
657
+ """
658
+ Normal = 0
659
+ Unavailable = 0x1
660
+ Selected = 0x2
661
+ Focused = 0x4
662
+ Pressed = 0x8
663
+ Checked = 0x10
664
+ Mixed = 0x20
665
+ Indeterminate = 0x20
666
+ ReadOnly = 0x40
667
+ HotTracked = 0x80
668
+ Default = 0x100
669
+ Expanded = 0x200
670
+ Collapsed = 0x400
671
+ Busy = 0x800
672
+ Floating = 0x1000
673
+ Marqueed = 0x2000
674
+ Animated = 0x4000
675
+ Invisible = 0x8000
676
+ Offscreen = 0x10000
677
+ Sizeable = 0x20000
678
+ Moveable = 0x40000
679
+ SelfVoicing = 0x80000
680
+ Focusable = 0x100000
681
+ Selectable = 0x200000
682
+ Linked = 0x400000
683
+ Traversed = 0x800000
684
+ MultiSelectable = 0x1000000
685
+ ExtSelectable = 0x2000000
686
+ AlertLow = 0x4000000
687
+ AlertMedium = 0x8000000
688
+ AlertHigh = 0x10000000
689
+ Protected = 0x20000000
690
+ Valid = 0x7fffffff
691
+ HasPopup = 0x40000000
692
+
693
+
694
+ class AccessibleSelection:
695
+ """
696
+ AccessibleSelection from IUIAutomation.
697
+ Refer https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.accessibleselection?view=netframework-4.8
698
+ """
699
+ None_ = 0
700
+ TakeFocus = 0x1
701
+ TakeSelection = 0x2
702
+ ExtendSelection = 0x4
703
+ AddSelection = 0x8
704
+ RemoveSelection = 0x10
705
+
706
+
707
+ class AnnotationType:
708
+ """
709
+ AnnotationType from IUIAutomation.
710
+ Refer https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-annotation-type-identifiers
711
+ """
712
+ AdvancedProofingIssue = 60020
713
+ Author = 60019
714
+ CircularReferenceError = 60022
715
+ Comment = 60003
716
+ ConflictingChange = 60018
717
+ DataValidationError = 60021
718
+ DeletionChange = 60012
719
+ EditingLockedChange = 60016
720
+ Endnote = 60009
721
+ ExternalChange = 60017
722
+ Footer = 60007
723
+ Footnote = 60010
724
+ FormatChange = 60014
725
+ FormulaError = 60004
726
+ GrammarError = 60002
727
+ Header = 60006
728
+ Highlighted = 60008
729
+ InsertionChange = 60011
730
+ Mathematics = 60023
731
+ MoveChange = 60013
732
+ SpellingError = 60001
733
+ TrackChanges = 60005
734
+ Unknown = 60000
735
+ UnsyncedChange = 60015
736
+
737
+
738
+ class NavigateDirection:
739
+ """
740
+ NavigateDirection from IUIAutomation.
741
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-navigatedirection
742
+ """
743
+ Parent = 0
744
+ NextSibling = 1
745
+ PreviousSibling = 2
746
+ FirstChild = 3
747
+ LastChild = 4
748
+
749
+
750
+ class DockPosition:
751
+ """
752
+ DockPosition from IUIAutomation.
753
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-dockposition
754
+ """
755
+ Top = 0
756
+ Left = 1
757
+ Bottom = 2
758
+ Right = 3
759
+ Fill = 4
760
+ None_ = 5
761
+
762
+
763
+ class ScrollAmount:
764
+ """
765
+ ScrollAmount from IUIAutomation.
766
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-scrollamount
767
+ """
768
+ LargeDecrement = 0
769
+ SmallDecrement = 1
770
+ NoAmount = 2
771
+ LargeIncrement = 3
772
+ SmallIncrement = 4
773
+
774
+
775
+ class StyleId:
776
+ """
777
+ StyleId from IUIAutomation.
778
+ Refer https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-style-identifiers
779
+ """
780
+ Custom = 70000
781
+ Heading1 = 70001
782
+ Heading2 = 70002
783
+ Heading3 = 70003
784
+ Heading4 = 70004
785
+ Heading5 = 70005
786
+ Heading6 = 70006
787
+ Heading7 = 70007
788
+ Heading8 = 70008
789
+ Heading9 = 70009
790
+ Title = 70010
791
+ Subtitle = 70011
792
+ Normal = 70012
793
+ Emphasis = 70013
794
+ Quote = 70014
795
+ BulletedList = 70015
796
+ NumberedList = 70016
797
+
798
+
799
+ class RowOrColumnMajor:
800
+ """
801
+ RowOrColumnMajor from IUIAutomation.
802
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-roworcolumnmajor
803
+ """
804
+ RowMajor = 0
805
+ ColumnMajor = 1
806
+ Indeterminate = 2
807
+
808
+
809
+ class ExpandCollapseState:
810
+ """
811
+ ExpandCollapseState from IUIAutomation.
812
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-expandcollapsestate
813
+ """
814
+ Collapsed = 0
815
+ Expanded = 1
816
+ PartiallyExpanded = 2
817
+ LeafNode = 3
818
+
819
+
820
+ class OrientationType:
821
+ """
822
+ OrientationType from IUIAutomation.
823
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-orientationtype
824
+ """
825
+ None_ = 0
826
+ Horizontal = 1
827
+ Vertical = 2
828
+
829
+
830
+ class ToggleState:
831
+ """
832
+ ToggleState from IUIAutomation.
833
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-togglestate
834
+ """
835
+ Off = 0
836
+ On = 1
837
+ Indeterminate = 2
838
+
839
+
840
+ class TextPatternRangeEndpoint:
841
+ """
842
+ TextPatternRangeEndpoint from IUIAutomation.
843
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-textpatternrangeendpoint
844
+ """
845
+ Start = 0
846
+ End = 1
847
+
848
+
849
+ class TextAttributeId:
850
+ """
851
+ TextAttributeId from IUIAutomation.
852
+ Refer https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-textattribute-ids
853
+ """
854
+ AfterParagraphSpacingAttribute = 40042
855
+ AnimationStyleAttribute = 40000
856
+ AnnotationObjectsAttribute = 40032
857
+ AnnotationTypesAttribute = 40031
858
+ BackgroundColorAttribute = 40001
859
+ BeforeParagraphSpacingAttribute = 40041
860
+ BulletStyleAttribute = 40002
861
+ CapStyleAttribute = 40003
862
+ CaretBidiModeAttribute = 40039
863
+ CaretPositionAttribute = 40038
864
+ CultureAttribute = 40004
865
+ FontNameAttribute = 40005
866
+ FontSizeAttribute = 40006
867
+ FontWeightAttribute = 40007
868
+ ForegroundColorAttribute = 40008
869
+ HorizontalTextAlignmentAttribute = 40009
870
+ IndentationFirstLineAttribute = 40010
871
+ IndentationLeadingAttribute = 40011
872
+ IndentationTrailingAttribute = 40012
873
+ IsActiveAttribute = 40036
874
+ IsHiddenAttribute = 40013
875
+ IsItalicAttribute = 40014
876
+ IsReadOnlyAttribute = 40015
877
+ IsSubscriptAttribute = 40016
878
+ IsSuperscriptAttribute = 40017
879
+ LineSpacingAttribute = 40040
880
+ LinkAttribute = 40035
881
+ MarginBottomAttribute = 40018
882
+ MarginLeadingAttribute = 40019
883
+ MarginTopAttribute = 40020
884
+ MarginTrailingAttribute = 40021
885
+ OutlineStylesAttribute = 40022
886
+ OverlineColorAttribute = 40023
887
+ OverlineStyleAttribute = 40024
888
+ SayAsInterpretAsAttribute = 40043
889
+ SelectionActiveEndAttribute = 40037
890
+ StrikethroughColorAttribute = 40025
891
+ StrikethroughStyleAttribute = 40026
892
+ StyleIdAttribute = 40034
893
+ StyleNameAttribute = 40033
894
+ TabsAttribute = 40027
895
+ TextFlowDirectionsAttribute = 40028
896
+ UnderlineColorAttribute = 40029
897
+ UnderlineStyleAttribute = 40030
898
+
899
+
900
+ class TextUnit:
901
+ """
902
+ TextUnit from IUIAutomation.
903
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-textunit
904
+ """
905
+ Character = 0
906
+ Format = 1
907
+ Word = 2
908
+ Line = 3
909
+ Paragraph = 4
910
+ Page = 5
911
+ Document = 6
912
+
913
+
914
+ class ZoomUnit:
915
+ """
916
+ ZoomUnit from IUIAutomation.
917
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-zoomunit
918
+ """
919
+ NoAmount = 0
920
+ LargeDecrement = 1
921
+ SmallDecrement = 2
922
+ LargeIncrement = 3
923
+ SmallIncrement = 4
924
+
925
+
926
+ class WindowInteractionState:
927
+ """
928
+ WindowInteractionState from IUIAutomation.
929
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-windowinteractionstate
930
+ """
931
+ Running = 0
932
+ Closing = 1
933
+ ReadyForUserInteraction = 2
934
+ BlockedByModalWindow = 3
935
+ NotResponding = 4
936
+
937
+
938
+ class WindowVisualState:
939
+ """
940
+ WindowVisualState from IUIAutomation.
941
+ Refer https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-windowvisualstate
942
+ """
943
+ Normal = 0
944
+ Maximized = 1
945
+ Minimized = 2
946
+
947
+
948
+ class ConsoleColor:
949
+ """ConsoleColor from Win32."""
950
+ Default = -1
951
+ Black = 0
952
+ DarkBlue = 1
953
+ DarkGreen = 2
954
+ DarkCyan = 3
955
+ DarkRed = 4
956
+ DarkMagenta = 5
957
+ DarkYellow = 6
958
+ Gray = 7
959
+ DarkGray = 8
960
+ Blue = 9
961
+ Green = 10
962
+ Cyan = 11
963
+ Red = 12
964
+ Magenta = 13
965
+ Yellow = 14
966
+ White = 15
967
+
968
+
969
+ class GAFlag:
970
+ """GAFlag from Win32."""
971
+ Parent = 1
972
+ Root = 2
973
+ RootOwner = 3
974
+
975
+
976
+ class MouseEventFlag:
977
+ """MouseEventFlag from Win32."""
978
+ Move = 0x0001
979
+ LeftDown = 0x0002
980
+ LeftUp = 0x0004
981
+ RightDown = 0x0008
982
+ RightUp = 0x0010
983
+ MiddleDown = 0x0020
984
+ MiddleUp = 0x0040
985
+ XDown = 0x0080
986
+ XUp = 0x0100
987
+ Wheel = 0x0800
988
+ HWheel = 0x1000
989
+ MoveNoCoalesce = 0x2000
990
+ VirtualDesk = 0x4000
991
+ Absolute = 0x8000
992
+
993
+
994
+ class KeyboardEventFlag:
995
+ """KeyboardEventFlag from Win32."""
996
+ KeyDown = 0x0000
997
+ ExtendedKey = 0x0001
998
+ KeyUp = 0x0002
999
+ KeyUnicode = 0x0004
1000
+ KeyScanCode = 0x0008
1001
+
1002
+
1003
+ class InputType:
1004
+ """InputType from Win32"""
1005
+ Mouse = 0
1006
+ Keyboard = 1
1007
+ Hardware = 2
1008
+
1009
+
1010
+ class ModifierKey:
1011
+ """ModifierKey from Win32."""
1012
+ Alt = 0x0001
1013
+ Control = 0x0002
1014
+ Shift = 0x0004
1015
+ Win = 0x0008
1016
+ NoRepeat = 0x4000
1017
+
1018
+
1019
+ class SW:
1020
+ """ShowWindow params from Win32."""
1021
+ Hide = 0
1022
+ ShowNormal = 1
1023
+ Normal = 1
1024
+ ShowMinimized = 2
1025
+ ShowMaximized = 3
1026
+ Maximize = 3
1027
+ ShowNoActivate = 4
1028
+ Show = 5
1029
+ Minimize = 6
1030
+ ShowMinNoActive = 7
1031
+ ShowNA = 8
1032
+ Restore = 9
1033
+ ShowDefault = 10
1034
+ ForceMinimize = 11
1035
+ Max = 11
1036
+
1037
+
1038
+ class SWP:
1039
+ """SetWindowPos params from Win32."""
1040
+ HWND_Top = 0
1041
+ HWND_Bottom = 1
1042
+ HWND_Topmost = -1
1043
+ HWND_NoTopmost = -2
1044
+ SWP_NoSize = 0x0001
1045
+ SWP_NoMove = 0x0002
1046
+ SWP_NoZOrder = 0x0004
1047
+ SWP_NoRedraw = 0x0008
1048
+ SWP_NoActivate = 0x0010
1049
+ SWP_FrameChanged = 0x0020 # The frame changed: send WM_NCCALCSIZE
1050
+ SWP_ShowWindow = 0x0040
1051
+ SWP_HideWindow = 0x0080
1052
+ SWP_NoCopyBits = 0x0100
1053
+ SWP_NoOwnerZOrder = 0x0200 # Don't do owner Z ordering
1054
+ SWP_NoSendChanging = 0x0400 # Don't send WM_WINDOWPOSCHANGING
1055
+ SWP_DrawFrame = SWP_FrameChanged
1056
+ SWP_NoReposition = SWP_NoOwnerZOrder
1057
+ SWP_DeferErase = 0x2000
1058
+ SWP_AsyncWindowPos = 0x4000
1059
+
1060
+
1061
+ class MB:
1062
+ """MessageBox flags from Win32."""
1063
+ Ok = 0x00000000
1064
+ OkCancel = 0x00000001
1065
+ AbortRetryIgnore = 0x00000002
1066
+ YesNoCancel = 0x00000003
1067
+ YesNo = 0x00000004
1068
+ RetryCancel = 0x00000005
1069
+ CancelTryContinue = 0x00000006
1070
+ IconHand = 0x00000010
1071
+ IconQuestion = 0x00000020
1072
+ IconExclamation = 0x00000030
1073
+ IconAsterisk = 0x00000040
1074
+ UserIcon = 0x00000080
1075
+ IconWarning = 0x00000030
1076
+ IconError = 0x00000010
1077
+ IconInformation = 0x00000040
1078
+ IconStop = 0x00000010
1079
+ DefButton1 = 0x00000000
1080
+ DefButton2 = 0x00000100
1081
+ DefButton3 = 0x00000200
1082
+ DefButton4 = 0x00000300
1083
+ ApplModal = 0x00000000
1084
+ SystemModal = 0x00001000
1085
+ TaskModal = 0x00002000
1086
+ Help = 0x00004000 # help button
1087
+ NoFocus = 0x00008000
1088
+ SetForeground = 0x00010000
1089
+ DefaultDesktopOnly = 0x00020000
1090
+ Topmost = 0x00040000
1091
+ Right = 0x00080000
1092
+ RtlReading = 0x00100000
1093
+ ServiceNotification = 0x00200000
1094
+ ServiceNotificationNT3X = 0x00040000
1095
+
1096
+ TypeMask = 0x0000000f
1097
+ IconMask = 0x000000f0
1098
+ DefMask = 0x00000f00
1099
+ ModeMask = 0x00003000
1100
+ MiscMask = 0x0000c000
1101
+
1102
+ IdOk = 1
1103
+ IdCancel = 2
1104
+ IdAbort = 3
1105
+ IdRetry = 4
1106
+ IdIgnore = 5
1107
+ IdYes = 6
1108
+ IdNo = 7
1109
+ IdClose = 8
1110
+ IdHelp = 9
1111
+ IdTryAgain = 10
1112
+ IdContinue = 11
1113
+ IdTimeout = 32000
1114
+
1115
+
1116
+ class GWL:
1117
+ ExStyle = -20
1118
+ HInstance = -6
1119
+ HwndParent = -8
1120
+ ID = -12
1121
+ Style = -16
1122
+ UserData = -21
1123
+ WndProc = -4
1124
+
1125
+
1126
+ class ProcessDpiAwareness:
1127
+ DpiUnaware = 0
1128
+ SystemDpiAware = 1
1129
+ PerMonitorDpiAware = 2
1130
+
1131
+
1132
+ class DpiAwarenessContext:
1133
+ Unaware = -1
1134
+ SystemAware = -2
1135
+ PerMonitorAware = -3
1136
+ PerMonitorAwareV2 = -4
1137
+ UnawareGdiScaled = -5
1138
+
1139
+
1140
+ class Keys:
1141
+ """Key codes from Win32."""
1142
+ VK_LBUTTON = 0x01 #Left mouse button
1143
+ VK_RBUTTON = 0x02 #Right mouse button
1144
+ VK_CANCEL = 0x03 #Control-break processing
1145
+ VK_MBUTTON = 0x04 #Middle mouse button (three-button mouse)
1146
+ VK_XBUTTON1 = 0x05 #X1 mouse button
1147
+ VK_XBUTTON2 = 0x06 #X2 mouse button
1148
+ VK_BACK = 0x08 #BACKSPACE key
1149
+ VK_TAB = 0x09 #TAB key
1150
+ VK_CLEAR = 0x0C #CLEAR key
1151
+ VK_RETURN = 0x0D #ENTER key
1152
+ VK_ENTER = 0x0D
1153
+ VK_SHIFT = 0x10 #SHIFT key
1154
+ VK_CONTROL = 0x11 #CTRL key
1155
+ VK_MENU = 0x12 #ALT key
1156
+ VK_PAUSE = 0x13 #PAUSE key
1157
+ VK_CAPITAL = 0x14 #CAPS LOCK key
1158
+ VK_KANA = 0x15 #IME Kana mode
1159
+ VK_HANGUEL = 0x15 #IME Hanguel mode (maintained for compatibility; use VK_HANGUL)
1160
+ VK_HANGUL = 0x15 #IME Hangul mode
1161
+ VK_JUNJA = 0x17 #IME Junja mode
1162
+ VK_FINAL = 0x18 #IME final mode
1163
+ VK_HANJA = 0x19 #IME Hanja mode
1164
+ VK_KANJI = 0x19 #IME Kanji mode
1165
+ VK_ESCAPE = 0x1B #ESC key
1166
+ VK_CONVERT = 0x1C #IME convert
1167
+ VK_NONCONVERT = 0x1D #IME nonconvert
1168
+ VK_ACCEPT = 0x1E #IME accept
1169
+ VK_MODECHANGE = 0x1F #IME mode change request
1170
+ VK_SPACE = 0x20 #SPACEBAR
1171
+ VK_PRIOR = 0x21 #PAGE UP key
1172
+ VK_PAGEUP = 0x21
1173
+ VK_NEXT = 0x22 #PAGE DOWN key
1174
+ VK_PAGEDOWN = 0x22
1175
+ VK_END = 0x23 #END key
1176
+ VK_HOME = 0x24 #HOME key
1177
+ VK_LEFT = 0x25 #LEFT ARROW key
1178
+ VK_UP = 0x26 #UP ARROW key
1179
+ VK_RIGHT = 0x27 #RIGHT ARROW key
1180
+ VK_DOWN = 0x28 #DOWN ARROW key
1181
+ VK_SELECT = 0x29 #SELECT key
1182
+ VK_PRINT = 0x2A #PRINT key
1183
+ VK_EXECUTE = 0x2B #EXECUTE key
1184
+ VK_SNAPSHOT = 0x2C #PRINT SCREEN key
1185
+ VK_INSERT = 0x2D #INS key
1186
+ VK_DELETE = 0x2E #DEL key
1187
+ VK_HELP = 0x2F #HELP key
1188
+ VK_0 = 0x30 #0 key
1189
+ VK_1 = 0x31 #1 key
1190
+ VK_2 = 0x32 #2 key
1191
+ VK_3 = 0x33 #3 key
1192
+ VK_4 = 0x34 #4 key
1193
+ VK_5 = 0x35 #5 key
1194
+ VK_6 = 0x36 #6 key
1195
+ VK_7 = 0x37 #7 key
1196
+ VK_8 = 0x38 #8 key
1197
+ VK_9 = 0x39 #9 key
1198
+ VK_A = 0x41 #A key
1199
+ VK_B = 0x42 #B key
1200
+ VK_C = 0x43 #C key
1201
+ VK_D = 0x44 #D key
1202
+ VK_E = 0x45 #E key
1203
+ VK_F = 0x46 #F key
1204
+ VK_G = 0x47 #G key
1205
+ VK_H = 0x48 #H key
1206
+ VK_I = 0x49 #I key
1207
+ VK_J = 0x4A #J key
1208
+ VK_K = 0x4B #K key
1209
+ VK_L = 0x4C #L key
1210
+ VK_M = 0x4D #M key
1211
+ VK_N = 0x4E #N key
1212
+ VK_O = 0x4F #O key
1213
+ VK_P = 0x50 #P key
1214
+ VK_Q = 0x51 #Q key
1215
+ VK_R = 0x52 #R key
1216
+ VK_S = 0x53 #S key
1217
+ VK_T = 0x54 #T key
1218
+ VK_U = 0x55 #U key
1219
+ VK_V = 0x56 #V key
1220
+ VK_W = 0x57 #W key
1221
+ VK_X = 0x58 #X key
1222
+ VK_Y = 0x59 #Y key
1223
+ VK_Z = 0x5A #Z key
1224
+ VK_LWIN = 0x5B #Left Windows key (Natural keyboard)
1225
+ VK_RWIN = 0x5C #Right Windows key (Natural keyboard)
1226
+ VK_APPS = 0x5D #Applications key (Natural keyboard)
1227
+ VK_SLEEP = 0x5F #Computer Sleep key
1228
+ VK_NUMPAD0 = 0x60 #Numeric keypad 0 key
1229
+ VK_NUMPAD1 = 0x61 #Numeric keypad 1 key
1230
+ VK_NUMPAD2 = 0x62 #Numeric keypad 2 key
1231
+ VK_NUMPAD3 = 0x63 #Numeric keypad 3 key
1232
+ VK_NUMPAD4 = 0x64 #Numeric keypad 4 key
1233
+ VK_NUMPAD5 = 0x65 #Numeric keypad 5 key
1234
+ VK_NUMPAD6 = 0x66 #Numeric keypad 6 key
1235
+ VK_NUMPAD7 = 0x67 #Numeric keypad 7 key
1236
+ VK_NUMPAD8 = 0x68 #Numeric keypad 8 key
1237
+ VK_NUMPAD9 = 0x69 #Numeric keypad 9 key
1238
+ VK_MULTIPLY = 0x6A #Multiply key
1239
+ VK_ADD = 0x6B #Add key
1240
+ VK_SEPARATOR = 0x6C #Separator key
1241
+ VK_SUBTRACT = 0x6D #Subtract key
1242
+ VK_DECIMAL = 0x6E #Decimal key
1243
+ VK_DIVIDE = 0x6F #Divide key
1244
+ VK_F1 = 0x70 #F1 key
1245
+ VK_F2 = 0x71 #F2 key
1246
+ VK_F3 = 0x72 #F3 key
1247
+ VK_F4 = 0x73 #F4 key
1248
+ VK_F5 = 0x74 #F5 key
1249
+ VK_F6 = 0x75 #F6 key
1250
+ VK_F7 = 0x76 #F7 key
1251
+ VK_F8 = 0x77 #F8 key
1252
+ VK_F9 = 0x78 #F9 key
1253
+ VK_F10 = 0x79 #F10 key
1254
+ VK_F11 = 0x7A #F11 key
1255
+ VK_F12 = 0x7B #F12 key
1256
+ VK_F13 = 0x7C #F13 key
1257
+ VK_F14 = 0x7D #F14 key
1258
+ VK_F15 = 0x7E #F15 key
1259
+ VK_F16 = 0x7F #F16 key
1260
+ VK_F17 = 0x80 #F17 key
1261
+ VK_F18 = 0x81 #F18 key
1262
+ VK_F19 = 0x82 #F19 key
1263
+ VK_F20 = 0x83 #F20 key
1264
+ VK_F21 = 0x84 #F21 key
1265
+ VK_F22 = 0x85 #F22 key
1266
+ VK_F23 = 0x86 #F23 key
1267
+ VK_F24 = 0x87 #F24 key
1268
+ VK_NUMLOCK = 0x90 #NUM LOCK key
1269
+ VK_SCROLL = 0x91 #SCROLL LOCK key
1270
+ VK_LSHIFT = 0xA0 #Left SHIFT key
1271
+ VK_RSHIFT = 0xA1 #Right SHIFT key
1272
+ VK_LCONTROL = 0xA2 #Left CONTROL key
1273
+ VK_RCONTROL = 0xA3 #Right CONTROL key
1274
+ VK_LMENU = 0xA4 #Left MENU key
1275
+ VK_RMENU = 0xA5 #Right MENU key
1276
+ VK_BROWSER_BACK = 0xA6 #Browser Back key
1277
+ VK_BROWSER_FORWARD = 0xA7 #Browser Forward key
1278
+ VK_BROWSER_REFRESH = 0xA8 #Browser Refresh key
1279
+ VK_BROWSER_STOP = 0xA9 #Browser Stop key
1280
+ VK_BROWSER_SEARCH = 0xAA #Browser Search key
1281
+ VK_BROWSER_FAVORITES = 0xAB #Browser Favorites key
1282
+ VK_BROWSER_HOME = 0xAC #Browser Start and Home key
1283
+ VK_VOLUME_MUTE = 0xAD #Volume Mute key
1284
+ VK_VOLUME_DOWN = 0xAE #Volume Down key
1285
+ VK_VOLUME_UP = 0xAF #Volume Up key
1286
+ VK_MEDIA_NEXT_TRACK = 0xB0 #Next Track key
1287
+ VK_MEDIA_PREV_TRACK = 0xB1 #Previous Track key
1288
+ VK_MEDIA_STOP = 0xB2 #Stop Media key
1289
+ VK_MEDIA_PLAY_PAUSE = 0xB3 #Play/Pause Media key
1290
+ VK_LAUNCH_MAIL = 0xB4 #Start Mail key
1291
+ VK_LAUNCH_MEDIA_SELECT = 0xB5 #Select Media key
1292
+ VK_LAUNCH_APP1 = 0xB6 #Start Application 1 key
1293
+ VK_LAUNCH_APP2 = 0xB7 #Start Application 2 key
1294
+ VK_OEM_1 = 0xBA #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the ';:' key
1295
+ VK_OEM_PLUS = 0xBB #For any country/region, the '+' key
1296
+ VK_OEM_COMMA = 0xBC #For any country/region, the ',' key
1297
+ VK_OEM_MINUS = 0xBD #For any country/region, the '-' key
1298
+ VK_OEM_PERIOD = 0xBE #For any country/region, the '.' key
1299
+ VK_OEM_2 = 0xBF #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the '/?' key
1300
+ VK_OEM_3 = 0xC0 #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the '`~' key
1301
+ VK_OEM_4 = 0xDB #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the '[{' key
1302
+ VK_OEM_5 = 0xDC #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the '\|' key
1303
+ VK_OEM_6 = 0xDD #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the ']}' key
1304
+ VK_OEM_7 = 0xDE #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the 'single-quote/double-quote' key
1305
+ VK_OEM_8 = 0xDF #Used for miscellaneous characters; it can vary by keyboard.
1306
+ VK_OEM_102 = 0xE2 #Either the angle bracket key or the backslash key on the RT 102-key keyboard
1307
+ VK_PROCESSKEY = 0xE5 #IME PROCESS key
1308
+ VK_PACKET = 0xE7 #Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KeyUp
1309
+ VK_ATTN = 0xF6 #Attn key
1310
+ VK_CRSEL = 0xF7 #CrSel key
1311
+ VK_EXSEL = 0xF8 #ExSel key
1312
+ VK_EREOF = 0xF9 #Erase EOF key
1313
+ VK_PLAY = 0xFA #Play key
1314
+ VK_ZOOM = 0xFB #Zoom key
1315
+ VK_NONAME = 0xFC #Reserved
1316
+ VK_PA1 = 0xFD #PA1 key
1317
+ VK_OEM_CLEAR = 0xFE #Clear key
1318
+
1319
+
1320
+ SpecialKeyNames = {
1321
+ 'LBUTTON': Keys.VK_LBUTTON, #Left mouse button
1322
+ 'RBUTTON': Keys.VK_RBUTTON, #Right mouse button
1323
+ 'CANCEL': Keys.VK_CANCEL, #Control-break processing
1324
+ 'MBUTTON': Keys.VK_MBUTTON, #Middle mouse button (three-button mouse)
1325
+ 'XBUTTON1': Keys.VK_XBUTTON1, #X1 mouse button
1326
+ 'XBUTTON2': Keys.VK_XBUTTON2, #X2 mouse button
1327
+ 'BACK': Keys.VK_BACK, #BACKSPACE key
1328
+ 'TAB': Keys.VK_TAB, #TAB key
1329
+ 'CLEAR': Keys.VK_CLEAR, #CLEAR key
1330
+ 'RETURN': Keys.VK_RETURN, #ENTER key
1331
+ 'ENTER': Keys.VK_RETURN, #ENTER key
1332
+ 'SHIFT': Keys.VK_SHIFT, #SHIFT key
1333
+ 'CTRL': Keys.VK_CONTROL, #CTRL key
1334
+ 'CONTROL': Keys.VK_CONTROL, #CTRL key
1335
+ 'ALT': Keys.VK_MENU, #ALT key
1336
+ 'PAUSE': Keys.VK_PAUSE, #PAUSE key
1337
+ 'CAPITAL': Keys.VK_CAPITAL, #CAPS LOCK key
1338
+ 'KANA': Keys.VK_KANA, #IME Kana mode
1339
+ 'HANGUEL': Keys.VK_HANGUEL, #IME Hanguel mode (maintained for compatibility; use VK_HANGUL)
1340
+ 'HANGUL': Keys.VK_HANGUL, #IME Hangul mode
1341
+ 'JUNJA': Keys.VK_JUNJA, #IME Junja mode
1342
+ 'FINAL': Keys.VK_FINAL, #IME final mode
1343
+ 'HANJA': Keys.VK_HANJA, #IME Hanja mode
1344
+ 'KANJI': Keys.VK_KANJI, #IME Kanji mode
1345
+ 'ESC': Keys.VK_ESCAPE, #ESC key
1346
+ 'ESCAPE': Keys.VK_ESCAPE, #ESC key
1347
+ 'CONVERT': Keys.VK_CONVERT, #IME convert
1348
+ 'NONCONVERT': Keys.VK_NONCONVERT, #IME nonconvert
1349
+ 'ACCEPT': Keys.VK_ACCEPT, #IME accept
1350
+ 'MODECHANGE': Keys.VK_MODECHANGE, #IME mode change request
1351
+ 'SPACE': Keys.VK_SPACE, #SPACEBAR
1352
+ 'PRIOR': Keys.VK_PRIOR, #PAGE UP key
1353
+ 'PAGEUP': Keys.VK_PRIOR, #PAGE UP key
1354
+ 'NEXT': Keys.VK_NEXT, #PAGE DOWN key
1355
+ 'PAGEDOWN': Keys.VK_NEXT, #PAGE DOWN key
1356
+ 'END': Keys.VK_END, #END key
1357
+ 'HOME': Keys.VK_HOME, #HOME key
1358
+ 'LEFT': Keys.VK_LEFT, #LEFT ARROW key
1359
+ 'UP': Keys.VK_UP, #UP ARROW key
1360
+ 'RIGHT': Keys.VK_RIGHT, #RIGHT ARROW key
1361
+ 'DOWN': Keys.VK_DOWN, #DOWN ARROW key
1362
+ 'SELECT': Keys.VK_SELECT, #SELECT key
1363
+ 'PRINT': Keys.VK_PRINT, #PRINT key
1364
+ 'EXECUTE': Keys.VK_EXECUTE, #EXECUTE key
1365
+ 'SNAPSHOT': Keys.VK_SNAPSHOT, #PRINT SCREEN key
1366
+ 'PRINTSCREEN': Keys.VK_SNAPSHOT, #PRINT SCREEN key
1367
+ 'INSERT': Keys.VK_INSERT, #INS key
1368
+ 'INS': Keys.VK_INSERT, #INS key
1369
+ 'DELETE': Keys.VK_DELETE, #DEL key
1370
+ 'DEL': Keys.VK_DELETE, #DEL key
1371
+ 'HELP': Keys.VK_HELP, #HELP key
1372
+ 'WIN': Keys.VK_LWIN, #Left Windows key (Natural keyboard)
1373
+ 'LWIN': Keys.VK_LWIN, #Left Windows key (Natural keyboard)
1374
+ 'RWIN': Keys.VK_RWIN, #Right Windows key (Natural keyboard)
1375
+ 'APPS': Keys.VK_APPS, #Applications key (Natural keyboard)
1376
+ 'SLEEP': Keys.VK_SLEEP, #Computer Sleep key
1377
+ 'NUMPAD0': Keys.VK_NUMPAD0, #Numeric keypad 0 key
1378
+ 'NUMPAD1': Keys.VK_NUMPAD1, #Numeric keypad 1 key
1379
+ 'NUMPAD2': Keys.VK_NUMPAD2, #Numeric keypad 2 key
1380
+ 'NUMPAD3': Keys.VK_NUMPAD3, #Numeric keypad 3 key
1381
+ 'NUMPAD4': Keys.VK_NUMPAD4, #Numeric keypad 4 key
1382
+ 'NUMPAD5': Keys.VK_NUMPAD5, #Numeric keypad 5 key
1383
+ 'NUMPAD6': Keys.VK_NUMPAD6, #Numeric keypad 6 key
1384
+ 'NUMPAD7': Keys.VK_NUMPAD7, #Numeric keypad 7 key
1385
+ 'NUMPAD8': Keys.VK_NUMPAD8, #Numeric keypad 8 key
1386
+ 'NUMPAD9': Keys.VK_NUMPAD9, #Numeric keypad 9 key
1387
+ 'MULTIPLY': Keys.VK_MULTIPLY, #Multiply key
1388
+ 'ADD': Keys.VK_ADD, #Add key
1389
+ 'SEPARATOR': Keys.VK_SEPARATOR, #Separator key
1390
+ 'SUBTRACT': Keys.VK_SUBTRACT, #Subtract key
1391
+ 'DECIMAL': Keys.VK_DECIMAL, #Decimal key
1392
+ 'DIVIDE': Keys.VK_DIVIDE, #Divide key
1393
+ 'F1': Keys.VK_F1, #F1 key
1394
+ 'F2': Keys.VK_F2, #F2 key
1395
+ 'F3': Keys.VK_F3, #F3 key
1396
+ 'F4': Keys.VK_F4, #F4 key
1397
+ 'F5': Keys.VK_F5, #F5 key
1398
+ 'F6': Keys.VK_F6, #F6 key
1399
+ 'F7': Keys.VK_F7, #F7 key
1400
+ 'F8': Keys.VK_F8, #F8 key
1401
+ 'F9': Keys.VK_F9, #F9 key
1402
+ 'F10': Keys.VK_F10, #F10 key
1403
+ 'F11': Keys.VK_F11, #F11 key
1404
+ 'F12': Keys.VK_F12, #F12 key
1405
+ 'F13': Keys.VK_F13, #F13 key
1406
+ 'F14': Keys.VK_F14, #F14 key
1407
+ 'F15': Keys.VK_F15, #F15 key
1408
+ 'F16': Keys.VK_F16, #F16 key
1409
+ 'F17': Keys.VK_F17, #F17 key
1410
+ 'F18': Keys.VK_F18, #F18 key
1411
+ 'F19': Keys.VK_F19, #F19 key
1412
+ 'F20': Keys.VK_F20, #F20 key
1413
+ 'F21': Keys.VK_F21, #F21 key
1414
+ 'F22': Keys.VK_F22, #F22 key
1415
+ 'F23': Keys.VK_F23, #F23 key
1416
+ 'F24': Keys.VK_F24, #F24 key
1417
+ 'NUMLOCK': Keys.VK_NUMLOCK, #NUM LOCK key
1418
+ 'SCROLL': Keys.VK_SCROLL, #SCROLL LOCK key
1419
+ 'LSHIFT': Keys.VK_LSHIFT, #Left SHIFT key
1420
+ 'RSHIFT': Keys.VK_RSHIFT, #Right SHIFT key
1421
+ 'LCONTROL': Keys.VK_LCONTROL, #Left CONTROL key
1422
+ 'LCTRL': Keys.VK_LCONTROL, #Left CONTROL key
1423
+ 'RCONTROL': Keys.VK_RCONTROL, #Right CONTROL key
1424
+ 'RCTRL': Keys.VK_RCONTROL, #Right CONTROL key
1425
+ 'LALT': Keys.VK_LMENU, #Left MENU key
1426
+ 'RALT': Keys.VK_RMENU, #Right MENU key
1427
+ 'BROWSER_BACK': Keys.VK_BROWSER_BACK, #Browser Back key
1428
+ 'BROWSER_FORWARD': Keys.VK_BROWSER_FORWARD, #Browser Forward key
1429
+ 'BROWSER_REFRESH': Keys.VK_BROWSER_REFRESH, #Browser Refresh key
1430
+ 'BROWSER_STOP': Keys.VK_BROWSER_STOP, #Browser Stop key
1431
+ 'BROWSER_SEARCH': Keys.VK_BROWSER_SEARCH, #Browser Search key
1432
+ 'BROWSER_FAVORITES': Keys.VK_BROWSER_FAVORITES, #Browser Favorites key
1433
+ 'BROWSER_HOME': Keys.VK_BROWSER_HOME, #Browser Start and Home key
1434
+ 'VOLUME_MUTE': Keys.VK_VOLUME_MUTE, #Volume Mute key
1435
+ 'VOLUME_DOWN': Keys.VK_VOLUME_DOWN, #Volume Down key
1436
+ 'VOLUME_UP': Keys.VK_VOLUME_UP, #Volume Up key
1437
+ 'MEDIA_NEXT_TRACK': Keys.VK_MEDIA_NEXT_TRACK, #Next Track key
1438
+ 'MEDIA_PREV_TRACK': Keys.VK_MEDIA_PREV_TRACK, #Previous Track key
1439
+ 'MEDIA_STOP': Keys.VK_MEDIA_STOP, #Stop Media key
1440
+ 'MEDIA_PLAY_PAUSE': Keys.VK_MEDIA_PLAY_PAUSE, #Play/Pause Media key
1441
+ 'LAUNCH_MAIL': Keys.VK_LAUNCH_MAIL, #Start Mail key
1442
+ 'LAUNCH_MEDIA_SELECT': Keys.VK_LAUNCH_MEDIA_SELECT,#Select Media key
1443
+ 'LAUNCH_APP1': Keys.VK_LAUNCH_APP1, #Start Application 1 key
1444
+ 'LAUNCH_APP2': Keys.VK_LAUNCH_APP2, #Start Application 2 key
1445
+ 'OEM_1': Keys.VK_OEM_1, #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the ';:' key
1446
+ 'OEM_PLUS': Keys.VK_OEM_PLUS, #For any country/region, the '+' key
1447
+ 'OEM_COMMA': Keys.VK_OEM_COMMA, #For any country/region, the ',' key
1448
+ 'OEM_MINUS': Keys.VK_OEM_MINUS, #For any country/region, the '-' key
1449
+ 'OEM_PERIOD': Keys.VK_OEM_PERIOD, #For any country/region, the '.' key
1450
+ 'OEM_2': Keys.VK_OEM_2, #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the '/?' key
1451
+ 'OEM_3': Keys.VK_OEM_3, #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the '`~' key
1452
+ 'OEM_4': Keys.VK_OEM_4, #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the '[{' key
1453
+ 'OEM_5': Keys.VK_OEM_5, #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the '\|' key
1454
+ 'OEM_6': Keys.VK_OEM_6, #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the ']}' key
1455
+ 'OEM_7': Keys.VK_OEM_7, #Used for miscellaneous characters; it can vary by keyboard.For the US standard keyboard, the 'single-quote/double-quote' key
1456
+ 'OEM_8': Keys.VK_OEM_8, #Used for miscellaneous characters; it can vary by keyboard.
1457
+ 'OEM_102': Keys.VK_OEM_102, #Either the angle bracket key or the backslash key on the RT 102-key keyboard
1458
+ 'PROCESSKEY': Keys.VK_PROCESSKEY, #IME PROCESS key
1459
+ 'PACKET': Keys.VK_PACKET, #Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KeyUp
1460
+ 'ATTN': Keys.VK_ATTN, #Attn key
1461
+ 'CRSEL': Keys.VK_CRSEL, #CrSel key
1462
+ 'EXSEL': Keys.VK_EXSEL, #ExSel key
1463
+ 'EREOF': Keys.VK_EREOF, #Erase EOF key
1464
+ 'PLAY': Keys.VK_PLAY, #Play key
1465
+ 'ZOOM': Keys.VK_ZOOM, #Zoom key
1466
+ 'NONAME': Keys.VK_NONAME, #Reserved
1467
+ 'PA1': Keys.VK_PA1, #PA1 key
1468
+ 'OEM_CLEAR': Keys.VK_OEM_CLEAR, #Clear key
1469
+ }
1470
+
1471
+
1472
+ CharacterCodes = {
1473
+ '0': Keys.VK_0, #0 key
1474
+ '1': Keys.VK_1, #1 key
1475
+ '2': Keys.VK_2, #2 key
1476
+ '3': Keys.VK_3, #3 key
1477
+ '4': Keys.VK_4, #4 key
1478
+ '5': Keys.VK_5, #5 key
1479
+ '6': Keys.VK_6, #6 key
1480
+ '7': Keys.VK_7, #7 key
1481
+ '8': Keys.VK_8, #8 key
1482
+ '9': Keys.VK_9, #9 key
1483
+ 'a': Keys.VK_A, #A key
1484
+ 'A': Keys.VK_A, #A key
1485
+ 'b': Keys.VK_B, #B key
1486
+ 'B': Keys.VK_B, #B key
1487
+ 'c': Keys.VK_C, #C key
1488
+ 'C': Keys.VK_C, #C key
1489
+ 'd': Keys.VK_D, #D key
1490
+ 'D': Keys.VK_D, #D key
1491
+ 'e': Keys.VK_E, #E key
1492
+ 'E': Keys.VK_E, #E key
1493
+ 'f': Keys.VK_F, #F key
1494
+ 'F': Keys.VK_F, #F key
1495
+ 'g': Keys.VK_G, #G key
1496
+ 'G': Keys.VK_G, #G key
1497
+ 'h': Keys.VK_H, #H key
1498
+ 'H': Keys.VK_H, #H key
1499
+ 'i': Keys.VK_I, #I key
1500
+ 'I': Keys.VK_I, #I key
1501
+ 'j': Keys.VK_J, #J key
1502
+ 'J': Keys.VK_J, #J key
1503
+ 'k': Keys.VK_K, #K key
1504
+ 'K': Keys.VK_K, #K key
1505
+ 'l': Keys.VK_L, #L key
1506
+ 'L': Keys.VK_L, #L key
1507
+ 'm': Keys.VK_M, #M key
1508
+ 'M': Keys.VK_M, #M key
1509
+ 'n': Keys.VK_N, #N key
1510
+ 'N': Keys.VK_N, #N key
1511
+ 'o': Keys.VK_O, #O key
1512
+ 'O': Keys.VK_O, #O key
1513
+ 'p': Keys.VK_P, #P key
1514
+ 'P': Keys.VK_P, #P key
1515
+ 'q': Keys.VK_Q, #Q key
1516
+ 'Q': Keys.VK_Q, #Q key
1517
+ 'r': Keys.VK_R, #R key
1518
+ 'R': Keys.VK_R, #R key
1519
+ 's': Keys.VK_S, #S key
1520
+ 'S': Keys.VK_S, #S key
1521
+ 't': Keys.VK_T, #T key
1522
+ 'T': Keys.VK_T, #T key
1523
+ 'u': Keys.VK_U, #U key
1524
+ 'U': Keys.VK_U, #U key
1525
+ 'v': Keys.VK_V, #V key
1526
+ 'V': Keys.VK_V, #V key
1527
+ 'w': Keys.VK_W, #W key
1528
+ 'W': Keys.VK_W, #W key
1529
+ 'x': Keys.VK_X, #X key
1530
+ 'X': Keys.VK_X, #X key
1531
+ 'y': Keys.VK_Y, #Y key
1532
+ 'Y': Keys.VK_Y, #Y key
1533
+ 'z': Keys.VK_Z, #Z key
1534
+ 'Z': Keys.VK_Z, #Z key
1535
+ ' ': Keys.VK_SPACE, #Space key
1536
+ '`': Keys.VK_OEM_3, #` key
1537
+ #'~' : Keys.VK_OEM_3, #~ key
1538
+ '-': Keys.VK_OEM_MINUS, #- key
1539
+ #'_' : Keys.VK_OEM_MINUS, #_ key
1540
+ '=': Keys.VK_OEM_PLUS, #= key
1541
+ #'+' : Keys.VK_OEM_PLUS, #+ key
1542
+ '[': Keys.VK_OEM_4, #[ key
1543
+ #'{' : Keys.VK_OEM_4, #{ key
1544
+ ']': Keys.VK_OEM_6, #] key
1545
+ #'}' : Keys.VK_OEM_6, #} key
1546
+ '\\': Keys.VK_OEM_5, #\ key
1547
+ #'|' : Keys.VK_OEM_5, #| key
1548
+ ';': Keys.VK_OEM_1, #; key
1549
+ #':' : Keys.VK_OEM_1, #: key
1550
+ '\'': Keys.VK_OEM_7, #' key
1551
+ #'"' : Keys.VK_OEM_7, #" key
1552
+ ',': Keys.VK_OEM_COMMA, #, key
1553
+ #'<' : Keys.VK_OEM_COMMA, #< key
1554
+ '.': Keys.VK_OEM_PERIOD, #. key
1555
+ #'>' : Keys.VK_OEM_PERIOD, #> key
1556
+ '/': Keys.VK_OEM_2, #/ key
1557
+ #'?' : Keys.VK_OEM_2, #? key
1558
+ }
1559
+
1560
+
1561
+ class ConsoleScreenBufferInfo(ctypes.Structure):
1562
+ _fields_ = [
1563
+ ('dwSize', ctypes.wintypes._COORD),
1564
+ ('dwCursorPosition', ctypes.wintypes._COORD),
1565
+ ('wAttributes', ctypes.c_uint),
1566
+ ('srWindow', ctypes.wintypes.SMALL_RECT),
1567
+ ('dwMaximumWindowSize', ctypes.wintypes._COORD),
1568
+ ]
1569
+
1570
+
1571
+ class MOUSEINPUT(ctypes.Structure):
1572
+ _fields_ = (('dx', ctypes.wintypes.LONG),
1573
+ ('dy', ctypes.wintypes.LONG),
1574
+ ('mouseData', ctypes.wintypes.DWORD),
1575
+ ('dwFlags', ctypes.wintypes.DWORD),
1576
+ ('time', ctypes.wintypes.DWORD),
1577
+ ('dwExtraInfo', ctypes.wintypes.PULONG))
1578
+
1579
+
1580
+ class KEYBDINPUT(ctypes.Structure):
1581
+ _fields_ = (('wVk', ctypes.wintypes.WORD),
1582
+ ('wScan', ctypes.wintypes.WORD),
1583
+ ('dwFlags', ctypes.wintypes.DWORD),
1584
+ ('time', ctypes.wintypes.DWORD),
1585
+ ('dwExtraInfo', ctypes.wintypes.PULONG))
1586
+
1587
+
1588
+ class HARDWAREINPUT(ctypes.Structure):
1589
+ _fields_ = (('uMsg', ctypes.wintypes.DWORD),
1590
+ ('wParamL', ctypes.wintypes.WORD),
1591
+ ('wParamH', ctypes.wintypes.WORD))
1592
+
1593
+
1594
+ class _INPUTUnion(ctypes.Union):
1595
+ _fields_ = (('mi', MOUSEINPUT),
1596
+ ('ki', KEYBDINPUT),
1597
+ ('hi', HARDWAREINPUT))
1598
+
1599
+
1600
+ class INPUT(ctypes.Structure):
1601
+ _fields_ = (('type', ctypes.wintypes.DWORD),
1602
+ ('union', _INPUTUnion))
1603
+
1604
+
1605
+ class Rect():
1606
+ """
1607
+ class Rect, like `ctypes.wintypes.RECT`.
1608
+ """
1609
+
1610
+ def __init__(self, left: int = 0, top: int = 0, right: int = 0, bottom: int = 0):
1611
+ self.left = left
1612
+ self.top = top
1613
+ self.right = right
1614
+ self.bottom = bottom
1615
+
1616
+ def width(self) -> int:
1617
+ return self.right - self.left
1618
+
1619
+ def height(self) -> int:
1620
+ return self.bottom - self.top
1621
+
1622
+ def xcenter(self) -> int:
1623
+ return self.left + self.width() // 2
1624
+
1625
+ def ycenter(self) -> int:
1626
+ return self.top + self.height() // 2
1627
+
1628
+ def isempty(self) -> int:
1629
+ return self.width() == 0 or self.height() == 0
1630
+
1631
+ def contains(self, x: int, y: int) -> bool:
1632
+ return self.left <= x < self.right and self.top <= y < self.bottom
1633
+
1634
+ def intersect(self, rect: 'Rect') -> 'Rect':
1635
+ left, top, right, bottom = max(self.left, rect.left), max(self.top, rect.top), min(self.right, rect.right), min(self.bottom, rect.bottom)
1636
+ return Rect(left, top, right, bottom)
1637
+
1638
+ def offset(self, x: int, y: int) -> None:
1639
+ self.left += x
1640
+ self.right += x
1641
+ self.top += y
1642
+ self.bottom += y
1643
+
1644
+ def __eq__(self, rect):
1645
+ return self.left == rect.left and self.top == rect.top and self.right == rect.right and self.bottom == rect.bottom
1646
+
1647
+ def __str__(self) -> str:
1648
+ return '({},{},{},{})[{}x{}]'.format(self.left, self.top, self.right, self.bottom, self.width(), self.height())
1649
+
1650
+ def __repr__(self) -> str:
1651
+ return '{}({},{},{},{})[{}x{}]'.format(self.__class__.__name__, self.left, self.top, self.right, self.bottom, self.width(), self.height())
1652
+
1653
+
1654
+ class ClipboardFormat:
1655
+ CF_TEXT = 1
1656
+ CF_BITMAP = 2
1657
+ CF_METAFILEPICT = 3
1658
+ CF_SYLK = 4
1659
+ CF_DIF = 5
1660
+ CF_TIFF = 6
1661
+ CF_OEMTEXT = 7
1662
+ CF_DIB = 8
1663
+ CF_PALETTE = 9
1664
+ CF_PENDATA = 10
1665
+ CF_RIFF = 11
1666
+ CF_WAVE = 12
1667
+ CF_UNICODETEXT = 13
1668
+ CF_ENHMETAFILE = 14
1669
+ CF_HDROP = 15
1670
+ CF_LOCALE = 16
1671
+ CF_DIBV5 = 17
1672
+ CF_MAX = 18
1673
+ CF_HTML = ctypes.windll.user32.RegisterClipboardFormatW("HTML Format")
1674
+
1675
+ class ActiveEnd(IntEnum):
1676
+ ActiveEnd_None = 0
1677
+ ActiveEnd_Start = 1
1678
+ ActiveEnd_End = 2
1679
+
1680
+ class AnimationStyle(IntEnum):
1681
+ AnimationStyle_None = 0
1682
+ AnimationStyle_LasVegasLights = 1
1683
+ AnimationStyle_BlinkingBackground = 2
1684
+ AnimationStyle_SparkleText = 3
1685
+ AnimationStyle_MarchingBlackAnts = 4
1686
+ AnimationStyle_MarchingRedAnts = 5
1687
+ AnimationStyle_Shimmer = 6
1688
+ AnimationStyle_Other = -1
1689
+
1690
+ class AsyncContentLoadedState(IntEnum):
1691
+ AsyncContentLoadedState_Beginning = 0
1692
+ AsyncContentLoadedState_Progress = 1
1693
+ AsyncContentLoadedState_Completed = 2
1694
+
1695
+ class AutomationElementMode(IntEnum):
1696
+ AutomationElementMode_None = 0
1697
+ AutomationElementMode_Full = 1
1698
+
1699
+ class AutomationIdentifierType(IntEnum):
1700
+ AutomationIdentifierType_Property = 0
1701
+ AutomationIdentifierType_Pattern = 1
1702
+ AutomationIdentifierType_Event = 2
1703
+ AutomationIdentifierType_ControlType = 3
1704
+ AutomationIdentifierType_TextAttribute = 4
1705
+ AutomationIdentifierType_LandmarkType = 5
1706
+ AutomationIdentifierType_Annotation = 6
1707
+ AutomationIdentifierType_Changes = 7
1708
+ AutomationIdentifierType_Style = 8
1709
+
1710
+ class BulletStyle(IntEnum):
1711
+ BulletStyle_None = 0
1712
+ BulletStyle_HollowRoundBullet = 1
1713
+ BulletStyle_FilledRoundBullet = 2
1714
+ BulletStyle_HollowSquareBullet = 3
1715
+ BulletStyle_FilledSquareBullet = 4
1716
+ BulletStyle_DashBullet = 5
1717
+ BulletStyle_Other = -1
1718
+
1719
+ class CapStyle(IntEnum):
1720
+ CapStyle_None = 0
1721
+ CapStyle_SmallCap = 1
1722
+ CapStyle_AllCap = 2
1723
+ CapStyle_AllPetiteCaps = 3
1724
+ CapStyle_PetiteCaps = 4
1725
+ CapStyle_Unicase = 5
1726
+ CapStyle_Titling = 6
1727
+ CapStyle_Other = -1
1728
+
1729
+ class CaretBidiMode(IntEnum):
1730
+ CaretBidiMode_LTR = 0
1731
+ CaretBidiMode_RTL = 1
1732
+
1733
+ class CaretPosition(IntEnum):
1734
+ CaretPosition_Unknown = 0
1735
+ CaretPosition_EndOfLine = 1
1736
+ CaretPosition_BeginningOfLine = 2
1737
+
1738
+ class CoalesceEventsOptions(IntFlag):
1739
+ CoalesceEventsOptions_Disabled = 0
1740
+ CoalesceEventsOptions_Enabled = 1
1741
+
1742
+ class ConditionType(IntEnum):
1743
+ ConditionType_True = 0
1744
+ ConditionType_False = 1
1745
+ ConditionType_Property = 2
1746
+ ConditionType_And = 3
1747
+ ConditionType_Or = 4
1748
+ ConditionType_Not = 5
1749
+
1750
+ class ConnectionRecoveryBehaviorOptions(IntFlag):
1751
+ ConnectionRecoveryBehaviorOptions_Disabled = 0
1752
+ ConnectionRecoveryBehaviorOptions_Enabled = 1
1753
+
1754
+ class EventArgsType(IntEnum):
1755
+ EventArgsType_Simple = 0
1756
+ EventArgsType_PropertyChanged = 1
1757
+ EventArgsType_StructureChanged = 2
1758
+ EventArgsType_AsyncContentLoaded = 3
1759
+ EventArgsType_WindowClosed = 4
1760
+ EventArgsType_TextEditTextChanged = 5
1761
+ EventArgsType_Changes = 6
1762
+ EventArgsType_Notification = 7
1763
+ EventArgsType_ActiveTextPositionChanged = 8
1764
+ EventArgsType_StructuredMarkup = 9
1765
+
1766
+ class FillType(IntEnum):
1767
+ FillType_None = 0
1768
+ FillType_Color = 1
1769
+ FillType_Gradient = 2
1770
+ FillType_Picture = 3
1771
+ FillType_Pattern = 4
1772
+
1773
+ class FlowDirections(IntEnum):
1774
+ FlowDirections_Default = 0
1775
+ FlowDirections_RightToLeft = 1
1776
+ FlowDirections_BottomToTop = 2
1777
+ FlowDirections_Vertical = 4
1778
+
1779
+ class LiveSetting(IntEnum):
1780
+ Off = 0
1781
+ Polite = 1
1782
+ Assertive = 2
1783
+
1784
+ class NormalizeState(IntEnum):
1785
+ NormalizeState_None = 0
1786
+ NormalizeState_View = 1
1787
+ NormalizeState_Custom = 2
1788
+
1789
+ class NotificationKind(IntEnum):
1790
+ NotificationKind_ItemAdded = 0
1791
+ NotificationKind_ItemRemoved = 1
1792
+ NotificationKind_ActionCompleted = 2
1793
+ NotificationKind_ActionAborted = 3
1794
+ NotificationKind_Other = 4
1795
+
1796
+ class NotificationProcessing(IntEnum):
1797
+ NotificationProcessing_ImportantAll = 0
1798
+ NotificationProcessing_ImportantMostRecent = 1
1799
+ NotificationProcessing_All = 2
1800
+ NotificationProcessing_MostRecent = 3
1801
+ NotificationProcessing_CurrentThenMostRecent = 4
1802
+ NotificationProcessing_ImportantCurrentThenMostRecent = 5
1803
+
1804
+ class OutlineStyles(IntEnum):
1805
+ OutlineStyles_None = 0
1806
+ OutlineStyles_Outline = 1
1807
+ OutlineStyles_Shadow = 2
1808
+ OutlineStyles_Engraved = 4
1809
+ OutlineStyles_Embossed = 8
1810
+
1811
+ class PropertyConditionFlags(IntFlag):
1812
+ PropertyConditionFlags_None = 0
1813
+ PropertyConditionFlags_IgnoreCase = 1
1814
+ PropertyConditionFlags_MatchSubstring = 2
1815
+
1816
+ class ProviderOptions(IntFlag):
1817
+ ProviderOptions_ClientSideProvider = 1
1818
+ ProviderOptions_ServerSideProvider = 2
1819
+ ProviderOptions_NonClientAreaProvider = 4
1820
+ ProviderOptions_OverrideProvider = 8
1821
+ ProviderOptions_ProviderOwnsSetFocus = 16
1822
+ ProviderOptions_UseComThreading = 32
1823
+ ProviderOptions_RefuseNonClientSupport = 64
1824
+ ProviderOptions_HasNativeIAccessible = 128
1825
+ ProviderOptions_UseClientCoordinates = 256
1826
+
1827
+ class ProviderType(IntEnum):
1828
+ ProviderType_BaseHwnd = 0
1829
+ ProviderType_Proxy = 1
1830
+ ProviderType_NonClientArea = 2
1831
+
1832
+ class SayAsInterpretAs(IntEnum):
1833
+ SayAsInterpretAs_None = 0
1834
+ SayAsInterpretAs_Spell = 1
1835
+ SayAsInterpretAs_Cardinal = 2
1836
+ SayAsInterpretAs_Ordinal = 3
1837
+ SayAsInterpretAs_Number = 4
1838
+ SayAsInterpretAs_Date = 5
1839
+ SayAsInterpretAs_Time = 6
1840
+ SayAsInterpretAs_Telephone = 7
1841
+ SayAsInterpretAs_Currency = 8
1842
+ SayAsInterpretAs_Net = 9
1843
+ SayAsInterpretAs_Url = 10
1844
+ SayAsInterpretAs_Address = 11
1845
+ SayAsInterpretAs_Alphanumeric = 12
1846
+ SayAsInterpretAs_Name = 13
1847
+ SayAsInterpretAs_Media = 14
1848
+ SayAsInterpretAs_Date_MonthDayYear = 15
1849
+ SayAsInterpretAs_Date_DayMonthYear = 16
1850
+ SayAsInterpretAs_Date_YearMonthDay = 17
1851
+ SayAsInterpretAs_Date_YearMonth = 18
1852
+ SayAsInterpretAs_Date_MonthYear = 19
1853
+ SayAsInterpretAs_Date_DayMonth = 20
1854
+ SayAsInterpretAs_Date_MonthDay = 21
1855
+ SayAsInterpretAs_Date_Year = 22
1856
+ SayAsInterpretAs_Time_HoursMinutesSeconds12 = 23
1857
+ SayAsInterpretAs_Time_HoursMinutes12 = 24
1858
+ SayAsInterpretAs_Time_HoursMinutesSeconds24 = 25
1859
+ SayAsInterpretAs_Time_HoursMinutes24 = 26
1860
+
1861
+ class StructureChangeType(IntEnum):
1862
+ StructureChangeType_ChildAdded = 0
1863
+ StructureChangeType_ChildRemoved = 1
1864
+ StructureChangeType_ChildrenInvalidated = 2
1865
+ StructureChangeType_ChildrenBulkAdded = 3
1866
+ StructureChangeType_ChildrenBulkRemoved = 4
1867
+ StructureChangeType_ChildrenReordered = 5
1868
+
1869
+ class SupportedTextSelection(IntEnum):
1870
+ SupportedTextSelection_None = 0
1871
+ SupportedTextSelection_Single = 1
1872
+ SupportedTextSelection_Multiple = 2
1873
+
1874
+ class SynchronizedInputType(IntEnum):
1875
+ SynchronizedInputType_KeyUp = 1
1876
+ SynchronizedInputType_KeyDown = 2
1877
+ SynchronizedInputType_LeftMouseUp = 4
1878
+ SynchronizedInputType_LeftMouseDown = 8
1879
+ SynchronizedInputType_RightMouseUp = 16
1880
+ SynchronizedInputType_RightMouseDown = 32
1881
+
1882
+ class TextDecorationLineStyle(IntEnum):
1883
+ TextDecorationLineStyle_None = 0
1884
+ TextDecorationLineStyle_Single = 1
1885
+ TextDecorationLineStyle_WordsOnly = 2
1886
+ TextDecorationLineStyle_Double = 3
1887
+ TextDecorationLineStyle_Dot = 4
1888
+ TextDecorationLineStyle_Dash = 5
1889
+ TextDecorationLineStyle_DashDot = 6
1890
+ TextDecorationLineStyle_DashDotDot = 7
1891
+ TextDecorationLineStyle_Wavy = 8
1892
+ TextDecorationLineStyle_ThickSingle = 9
1893
+ TextDecorationLineStyle_DoubleWavy = 11
1894
+ TextDecorationLineStyle_ThickWavy = 12
1895
+ TextDecorationLineStyle_LongDash = 13
1896
+ TextDecorationLineStyle_ThickDash = 14
1897
+ TextDecorationLineStyle_ThickDashDot = 15
1898
+ TextDecorationLineStyle_ThickDashDotDot = 16
1899
+ TextDecorationLineStyle_ThickDot = 17
1900
+ TextDecorationLineStyle_ThickLongDash = 18
1901
+ TextDecorationLineStyle_Other = -1
1902
+
1903
+ class TextEditChangeType(IntEnum):
1904
+ TextEditChangeType_None = 0
1905
+ TextEditChangeType_AutoCorrect = 1
1906
+ TextEditChangeType_Composition = 2
1907
+ TextEditChangeType_CompositionFinalized = 3
1908
+ TextEditChangeType_AutoComplete = 4
1909
+
1910
+ class TreeScope(IntEnum):
1911
+ TreeScope_None = 0
1912
+ TreeScope_Element = 1
1913
+ TreeScope_Children = 2
1914
+ TreeScope_Descendants = 4
1915
+ TreeScope_Parent = 8
1916
+ TreeScope_Ancestors = 16
1917
+ TreeScope_Subtree = 7
1918
+
1919
+ class TreeTraversalOptions(IntFlag):
1920
+ TreeTraversalOptions_Default = 0
1921
+ TreeTraversalOptions_PostOrder = 1
1922
+ TreeTraversalOptions_LastToFirstOrder = 2
1923
+
1924
+ class UIAutomationType(IntEnum):
1925
+ UIAutomationType_Int = 1
1926
+ UIAutomationType_Bool = 2
1927
+ UIAutomationType_String = 3
1928
+ UIAutomationType_Double = 4
1929
+ UIAutomationType_Point = 5
1930
+ UIAutomationType_Rect = 6
1931
+ UIAutomationType_Element = 7
1932
+ UIAutomationType_Array = 65536
1933
+ UIAutomationType_Out = 131072
1934
+ UIAutomationType_IntArray = 131073
1935
+ UIAutomationType_BoolArray = 131074
1936
+ UIAutomationType_StringArray = 131075
1937
+ UIAutomationType_DoubleArray = 131076
1938
+ UIAutomationType_PointArray = 131077
1939
+ UIAutomationType_RectArray = 131078
1940
+ UIAutomationType_ElementArray = 131079
1941
+ UIAutomationType_OutInt = 131080
1942
+ UIAutomationType_OutBool = 131081
1943
+ UIAutomationType_OutString = 131082
1944
+ UIAutomationType_OutDouble = 131083
1945
+ UIAutomationType_OutPoint = 131084
1946
+ UIAutomationType_OutRect = 131085
1947
+ UIAutomationType_OutElement = 131086
1948
+ UIAutomationType_OutIntArray = 131087
1949
+ UIAutomationType_OutBoolArray = 131088
1950
+ UIAutomationType_OutStringArray = 131089
1951
+ UIAutomationType_OutDoubleArray = 131090
1952
+ UIAutomationType_OutPointArray = 131091
1953
+ UIAutomationType_OutRectArray = 131092
1954
+ UIAutomationType_OutElementArray = 131093
1955
+
1956
+ class VisualEffects(IntEnum):
1957
+ VisualEffects_None = 0
1958
+ VisualEffects_Shadow = 1
1959
+ VisualEffects_Reflection = 2
1960
+ VisualEffects_Glow = 3
1961
+ VisualEffects_SoftEdges = 4
1962
+ VisualEffects_Bevel = 5
1963
+