tdrpa.tdworker 1.2.13.9__py310-none-win_amd64.whl → 1.2.13.50__py310-none-win_amd64.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.
- tdrpa/tdworker/__init__.pyi +2 -10
- tdrpa/tdworker/{_img.pyi → _other.pyi} +294 -0
- tdrpa/tdworker/_web.pyi +76 -229
- tdrpa/tdworker/_win.pyi +545 -0
- tdrpa/tdworker.cp310-win_amd64.pyd +0 -0
- {tdrpa_tdworker-1.2.13.9.dist-info → tdrpa_tdworker-1.2.13.50.dist-info}/METADATA +2 -2
- {tdrpa_tdworker-1.2.13.9.dist-info → tdrpa_tdworker-1.2.13.50.dist-info}/RECORD +9 -17
- tdrpa/tdworker/_clip.pyi +0 -50
- tdrpa/tdworker/_file.pyi +0 -77
- tdrpa/tdworker/_network.pyi +0 -94
- tdrpa/tdworker/_os.pyi +0 -47
- tdrpa/tdworker/_sp.pyi +0 -21
- tdrpa/tdworker/_w.pyi +0 -129
- tdrpa/tdworker/_winE.pyi +0 -228
- tdrpa/tdworker/_winK.pyi +0 -74
- tdrpa/tdworker/_winM.pyi +0 -117
- {tdrpa_tdworker-1.2.13.9.dist-info → tdrpa_tdworker-1.2.13.50.dist-info}/WHEEL +0 -0
- {tdrpa_tdworker-1.2.13.9.dist-info → tdrpa_tdworker-1.2.13.50.dist-info}/top_level.txt +0 -0
tdrpa/tdworker/_win.pyi
ADDED
@@ -0,0 +1,545 @@
|
|
1
|
+
import uiautomation as uia
|
2
|
+
|
3
|
+
class Window:
|
4
|
+
@staticmethod
|
5
|
+
def Close(target: str | uia.Control) -> None:
|
6
|
+
"""
|
7
|
+
关闭窗口
|
8
|
+
|
9
|
+
Window.Close(target)
|
10
|
+
|
11
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
12
|
+
:return: None
|
13
|
+
"""
|
14
|
+
@staticmethod
|
15
|
+
def GetActive(isReturnHwnd: bool = True) -> uia.Control | int:
|
16
|
+
"""
|
17
|
+
获取活动窗口
|
18
|
+
|
19
|
+
Window.GetActive(isReturnHwnd=True)
|
20
|
+
|
21
|
+
:param isReturnHwnd: [可选参数]是否返回窗口句柄,True时函数返回窗口句柄,False时返回窗口元素对象。默认True
|
22
|
+
:return:窗口句柄或者窗口元素对象
|
23
|
+
"""
|
24
|
+
@staticmethod
|
25
|
+
def SetActive(target: str | uia.Control) -> bool:
|
26
|
+
"""
|
27
|
+
设置活动窗口
|
28
|
+
|
29
|
+
Window.SetActive(target)
|
30
|
+
|
31
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
32
|
+
:return: bool。激活成功返回True,否则返回False
|
33
|
+
"""
|
34
|
+
@staticmethod
|
35
|
+
def Show(target: str | uia.Control, showStatus: str = 'show') -> bool:
|
36
|
+
'''
|
37
|
+
更改窗口显示状态
|
38
|
+
|
39
|
+
Window.Show(target, showStatus="show")
|
40
|
+
|
41
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
42
|
+
:param showStatus: [可选参数] 显示:\'show\' 隐藏:\'hide\' 最大化:\'max\' 最小化:\'min\' 还原:\'restore\'。默认\'show\'
|
43
|
+
:return: bool。执行成功返回True,否则返回False
|
44
|
+
'''
|
45
|
+
@staticmethod
|
46
|
+
def Exists(target: str | uia.WindowControl) -> bool:
|
47
|
+
"""
|
48
|
+
判断窗口是否存在
|
49
|
+
|
50
|
+
Window.Exists(target)
|
51
|
+
|
52
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象
|
53
|
+
:return: bool。窗口存在返回True,否则返回False
|
54
|
+
"""
|
55
|
+
@staticmethod
|
56
|
+
def GetSize(target: str | uia.Control) -> dict:
|
57
|
+
'''
|
58
|
+
获取窗口大小
|
59
|
+
|
60
|
+
Window.GetSize(target)
|
61
|
+
|
62
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
63
|
+
:return: {"height":int, "width":int, "x":int, "y":int}
|
64
|
+
'''
|
65
|
+
@staticmethod
|
66
|
+
def SetSize(target: str | uia.Control, width: int, height: int) -> None:
|
67
|
+
"""
|
68
|
+
改变窗口大小
|
69
|
+
|
70
|
+
Window.SetSize(target, 800, 600)
|
71
|
+
|
72
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
73
|
+
:param width: [必选参数]窗口宽度
|
74
|
+
:param height: [必选参数]窗口高度
|
75
|
+
:return: None
|
76
|
+
"""
|
77
|
+
@staticmethod
|
78
|
+
def Move(target: str | uia.Control, x: int, y: int) -> None:
|
79
|
+
"""
|
80
|
+
移动窗口位置
|
81
|
+
|
82
|
+
Window.Move(target, 0, 0)
|
83
|
+
|
84
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
85
|
+
:param x: [必选参数]移动到新位置的横坐标
|
86
|
+
:param y: [必选参数]移动到新位置的纵坐标
|
87
|
+
:return: None
|
88
|
+
"""
|
89
|
+
@staticmethod
|
90
|
+
def TopMost(target: str | uia.Control, isTopMost: bool = True) -> bool:
|
91
|
+
"""
|
92
|
+
窗口置顶
|
93
|
+
|
94
|
+
Window.TopMost(target, isTopMost=True)
|
95
|
+
|
96
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
97
|
+
:param isTopMost: [可选参数]是否使窗口置顶,窗口置顶:true 窗口取消置顶:false。默认True
|
98
|
+
:return: bool值,设置成功返回True,否则返回False
|
99
|
+
"""
|
100
|
+
@staticmethod
|
101
|
+
def GetClass(target: str | uia.Control) -> str:
|
102
|
+
"""
|
103
|
+
获取窗口类名
|
104
|
+
|
105
|
+
Window.GetClass(target)
|
106
|
+
|
107
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
108
|
+
:return: 窗口的类名称
|
109
|
+
"""
|
110
|
+
@staticmethod
|
111
|
+
def GetPath(target: str | uia.Control) -> str:
|
112
|
+
"""
|
113
|
+
获取窗口程序的文件路径
|
114
|
+
|
115
|
+
Window.GetPath(target)
|
116
|
+
|
117
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
118
|
+
:return: 文件绝对路径
|
119
|
+
"""
|
120
|
+
@staticmethod
|
121
|
+
def GetPID(target: str | uia.Control) -> int:
|
122
|
+
"""
|
123
|
+
获取进程PID
|
124
|
+
|
125
|
+
Window.GetPID(target)
|
126
|
+
|
127
|
+
:param target: [必选参数]tdRPA拾取器获取的目标窗口元素特征字符串或uia目标窗口元素对象,也可选取窗口内始终存在的元素。
|
128
|
+
:return: PID
|
129
|
+
"""
|
130
|
+
|
131
|
+
class WinMouse:
|
132
|
+
@staticmethod
|
133
|
+
def Action(target: str | uia.Control, button: str = 'left', clickType: str = 'click', searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100, setForeground: bool = True, cursorPosition: str = 'center', cursorOffsetX: int = 0, cursorOffsetY: int = 0, keyModifiers: list = None, simulateType: str = 'simulate', moveSmoothly: bool = False) -> uia.Control:
|
134
|
+
'''
|
135
|
+
点击目标元素
|
136
|
+
|
137
|
+
WinMouse.Action(target, button="left", clickType="click", searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100, setForeground=True, cursorPosition=\'center\', cursorOffsetX=0, cursorOffsetY=0, keyModifiers=None, simulateType=\'simulate\', moveSmoothly=False)
|
138
|
+
|
139
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
140
|
+
:param button: [可选参数]鼠标点击。鼠标左键:"left" 鼠标右键:"right" 鼠标中键:"middle"。默认"left"
|
141
|
+
:param clickType: [可选参数]点击类型。单击:"click" 双击:"dblclick" 按下:"down" 弹起:"up"。默认"click"
|
142
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
143
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
144
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
145
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
146
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
147
|
+
:param setForeground: [可选参数]激活窗口。默认True
|
148
|
+
:param cursorPosition: [可选参数]光标位置。中心:"center" 左上角:"topLeft" 右上角:"topRight" 左下角:"bottomLeft" 右下角:"bottomRight"。默认"center"
|
149
|
+
:param cursorOffsetX: [可选参数]横坐标偏移。默认0
|
150
|
+
:param cursorOffsetY: [可选参数]纵坐标偏移。默认0
|
151
|
+
:param keyModifiers: [可选参数]辅助按键["Alt","Ctrl","Shift","Win"]可多选。默认None
|
152
|
+
:param simulateType: [可选参数]操作类型。模拟操作:"simulate" 消息操作:"message"。默认"simulate"
|
153
|
+
:param moveSmoothly: [可选参数]是否平滑移动鼠标。默认False
|
154
|
+
:return:目标元素对象
|
155
|
+
'''
|
156
|
+
@staticmethod
|
157
|
+
def Hover(target: str | uia.Control, searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100, setForeground: bool = True, cursorPosition: str = 'center', cursorOffsetX: int = 0, cursorOffsetY: int = 0, keyModifiers: list = None, simulateType: str = 'simulate', moveSmoothly: bool = True) -> uia.Control:
|
158
|
+
'''
|
159
|
+
移动到目标上
|
160
|
+
|
161
|
+
WinMouse.Hover(target, searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100, setForeground=True, cursorPosition=\'center\', cursorOffsetX=0, cursorOffsetY=0, keyModifiers=None, simulateType=\'simulate\', moveSmoothly=False)
|
162
|
+
|
163
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
164
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
165
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
166
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
167
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
168
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
169
|
+
:param setForeground: [可选参数]激活窗口。默认True
|
170
|
+
:param cursorPosition: [可选参数]光标位置。中心:"center" 左上角:"topLeft" 右上角:"topRight" 左下角:"bottomLeft" 右下角:"bottomRight"。默认"center"
|
171
|
+
:param cursorOffsetX: [可选参数]横坐标偏移。默认0
|
172
|
+
:param cursorOffsetY: [可选参数]纵坐标偏移。默认0
|
173
|
+
:param keyModifiers: [可选参数]辅助按键["Alt","Ctrl","Shift","Win"]可多选。默认None
|
174
|
+
:param simulateType: [可选参数]操作类型。模拟操作:"simulate" 消息操作:"message"。默认"simulate"
|
175
|
+
:param moveSmoothly: [可选参数]平滑移动。默认True
|
176
|
+
:return:目标元素对象
|
177
|
+
'''
|
178
|
+
@staticmethod
|
179
|
+
def Click(button: str = 'left', clickType: str = 'click', keyModifiers: list = None, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
180
|
+
'''
|
181
|
+
模拟点击
|
182
|
+
|
183
|
+
WinMouse.Click(button="left", clickType="click", keyModifiers=None, delayAfter=100, delayBefore=100)
|
184
|
+
|
185
|
+
:param button: [可选参数]鼠标点击。鼠标左键:"left" 鼠标右键:"right" 鼠标中键:"middle"。默认"left"
|
186
|
+
:param clickType: [可选参数]点击类型。单击:"click" 双击:"dblclick" 按下:"down" 弹起:"up"。默认"click"
|
187
|
+
:param keyModifiers: [可选参数]辅助按键["Alt","Ctrl","Shift","Win"]可多选。默认None
|
188
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
189
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
190
|
+
:return: None
|
191
|
+
'''
|
192
|
+
@staticmethod
|
193
|
+
def Move(x: int, y: int, isRelativeMove: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
194
|
+
"""
|
195
|
+
# 模拟移动
|
196
|
+
|
197
|
+
WinMouse.Move(0, 0, isRelativeMove=False, delayAfter=100, delayBefore=100)
|
198
|
+
|
199
|
+
:param x: [必选参数]横坐标
|
200
|
+
:param y: [必选参数]纵坐标
|
201
|
+
:param isRelativeMove: [可选参数]是否相对目前位置移动。默认False
|
202
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
203
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
204
|
+
:return: None
|
205
|
+
"""
|
206
|
+
@staticmethod
|
207
|
+
def GetPos() -> tuple[int, int]:
|
208
|
+
"""
|
209
|
+
获取鼠标位置
|
210
|
+
|
211
|
+
WinMouse.GetPos()
|
212
|
+
|
213
|
+
:return:pointX, pointY
|
214
|
+
"""
|
215
|
+
@staticmethod
|
216
|
+
def Drag(x1: int, y1: int, x2: int, y2: int, button: str = 'left', keyModifiers: list = None, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
217
|
+
'''
|
218
|
+
模拟拖动
|
219
|
+
|
220
|
+
WinMouse.Drag(0, 0, 0, 0, button=\'left\', keyModifiers=None, delayAfter=100, delayBefore=100)
|
221
|
+
|
222
|
+
:param x1: [必选参数]起始横坐标
|
223
|
+
:param y1: [必选参数]起始纵坐标
|
224
|
+
:param x2: [必选参数]结束横坐标
|
225
|
+
:param y2: [必选参数]结束纵坐标
|
226
|
+
:param button: [可选参数]鼠标按键。鼠标左键:"left" 鼠标右键:"right" 鼠标中键:"middle"。默认"left"
|
227
|
+
:param keyModifiers: [可选参数]辅助按键["Alt","Ctrl","Shift","Win"]可多选。默认None
|
228
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
229
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
230
|
+
:return: None
|
231
|
+
'''
|
232
|
+
@staticmethod
|
233
|
+
def Wheel(scrollNum: int, scrollDirection: str = 'down', keyModifiers: list = None, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
234
|
+
'''
|
235
|
+
模拟滚轮
|
236
|
+
|
237
|
+
WinMouse.Wheel(1, scrollDirection="down", keyModifiers=None, delayAfter=100, delayBefore=100)
|
238
|
+
|
239
|
+
:param scrollNum: [必选参数]滚动次数
|
240
|
+
:param scrollDirection: [可选参数]滚动方向。向上:"up" 向下:"down"。默认"down"
|
241
|
+
:param keyModifiers: [可选参数]辅助按键["Alt","Ctrl","Shift","Win"]可多选。默认None
|
242
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
243
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
244
|
+
:return: None
|
245
|
+
'''
|
246
|
+
|
247
|
+
class WinKeyboard:
|
248
|
+
@staticmethod
|
249
|
+
def InputText(target: str | uia.Control, content: str, clearOldText: bool = True, inputInterval: int = 50, searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100, setForeground: bool = True, simulateType: str = 'message', validate: bool = False, clickBeforeInput: bool = False) -> uia.Control:
|
250
|
+
'''
|
251
|
+
在目标中输入
|
252
|
+
|
253
|
+
WinKeyboard.InputText(target, \'\', clearOldText=True, inputInterval=50, searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100, setForeground=True, simulateType=\'message\', validate=False, clickBeforeInput=False)
|
254
|
+
|
255
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
256
|
+
:param content: [必选参数]写入文本
|
257
|
+
:param clearOldText: [可选参数]是否清空原内容。默认True
|
258
|
+
:param inputInterval: [可选参数]键入间隔(毫秒)。默认50
|
259
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
260
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
261
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
262
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
263
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
264
|
+
:param setForeground: [可选参数]激活窗口。默认True
|
265
|
+
:param simulateType: [可选参数]操作类型。模拟操作:"simulate" 消息操作:"message"。默认"message"
|
266
|
+
:param validate: [可选参数]验证写入文本。默认False
|
267
|
+
:param clickBeforeInput: [可选参数]输入前点击。默认False
|
268
|
+
:return: 目标元素对象
|
269
|
+
'''
|
270
|
+
@staticmethod
|
271
|
+
def PressKey(target: str | uia.Control, button: str, searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100, setForeground: bool = True, keyModifiers: list = None, simulateType: str = 'message', clickBeforeInput: bool = False) -> uia.Control:
|
272
|
+
'''
|
273
|
+
在目标中按键
|
274
|
+
|
275
|
+
WinKeyboard.PressKey(target, "Enter", searchDelay=10000, continueOnError=False, delayAfter=100, delayBefore=100, setForeground=True, keyModifiers=None, simulateType=\'message\', clickBeforeInput=False)
|
276
|
+
|
277
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
278
|
+
:param button: [必选参数]键盘按键上的符号。如"Enter"
|
279
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
280
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
281
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
282
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
283
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
284
|
+
:param setForeground: [可选参数]激活窗口。默认True
|
285
|
+
:param keyModifiers: [可选参数]辅助按键[\'Alt\',\'Ctrl\',\'Shift\',\'Win\']可多选。默认None
|
286
|
+
:param simulateType: [可选参数]操作类型。模拟操作:"simulate" 消息操作:"message"。默认"message"
|
287
|
+
:param clickBeforeInput: [可选参数]输入前点击。默认False
|
288
|
+
:return: 目标元素对象
|
289
|
+
'''
|
290
|
+
@staticmethod
|
291
|
+
def Input(content: str, inputInterval: int = 50, delayAfter: int = 100, delayBefore: int = 100, simulateType: str = 'message') -> None:
|
292
|
+
'''
|
293
|
+
输入文本
|
294
|
+
|
295
|
+
WinKeyboard.Input(\'\', inputInterval=50, delayAfter=100, delayBefore=100, simulateType=\'message\')
|
296
|
+
|
297
|
+
:param content: [必选参数]输入内容
|
298
|
+
:param inputInterval: [可选参数]键入间隔(毫秒)。默认50
|
299
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
300
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
301
|
+
:param simulateType: [可选参数]操作类型。模拟操作:"simulate" 消息操作:"message"。默认"message"
|
302
|
+
:return: None
|
303
|
+
'''
|
304
|
+
@staticmethod
|
305
|
+
def Press(button: str, pressType: str = 'press', keyModifiers: list = None, delayAfter: int = 100, delayBefore: int = 100, simulateType: str = 'message') -> None:
|
306
|
+
'''
|
307
|
+
模拟按键
|
308
|
+
|
309
|
+
WinKeyboard.Press(\'Enter\', pressType=\'press\', keyModifiers=None, delayAfter=100, delayBefore=100, simulateType=\'message\')
|
310
|
+
|
311
|
+
:param button: [必选参数]键盘按键上的符号,如“Enter”
|
312
|
+
:param pressType: [可选参数]点击类型。单击:"press" 按下:"down" 弹起:"up"。默认"press"
|
313
|
+
:param keyModifiers: [可选参数]辅助按键["Alt","Ctrl","Shift","Win"]可多选。默认None
|
314
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
315
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
316
|
+
:param simulateType: [可选参数]操作类型。模拟操作:"simulate" 消息操作:"message"。默认"message"
|
317
|
+
:return: None
|
318
|
+
'''
|
319
|
+
|
320
|
+
class WinElement:
|
321
|
+
@staticmethod
|
322
|
+
def FindElementByTd(tdTargetStr: str = None, anchorsElement: uia.Control = None, searchDelay: int = 10000, continueOnError: bool = False):
|
323
|
+
"""
|
324
|
+
依据tdrpa拾取器获取的元素特征码查找元素
|
325
|
+
|
326
|
+
WinElement.FindElementByTd('', anchorsElement=None, searchDelay=10000, continueOnError=False)
|
327
|
+
|
328
|
+
:param tdTargetStr: 目标元素特征码(tdrpa拾取器获取)
|
329
|
+
:param anchorsElement: 从哪个元素开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
330
|
+
:param searchDelay: 查找延时(豪秒)。默认10000
|
331
|
+
:param continueOnError: 错误继续执行。默认False
|
332
|
+
:return: 目标元素 or None
|
333
|
+
"""
|
334
|
+
@staticmethod
|
335
|
+
def GetChildren(target: str | uia.Control, searchType: str = 'all', searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> list | uia.Control:
|
336
|
+
'''
|
337
|
+
获取子元素
|
338
|
+
|
339
|
+
WinElement.GetChildren(target, searchType=\'all\', searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
340
|
+
|
341
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
342
|
+
:param searchType: [可选参数]搜索方式。全部子元素:"all" 首个子元素:"first" 最后一个子元素:"last"。默认"all"
|
343
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
344
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
345
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
346
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
347
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
348
|
+
:return: 目标元素对象的子元素列表 或 首个子元素 或 最后一个子元素
|
349
|
+
'''
|
350
|
+
@staticmethod
|
351
|
+
def GetParent(target: str | uia.Control, upLevels: int = 1, searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> uia.Control:
|
352
|
+
"""
|
353
|
+
获取父元素
|
354
|
+
|
355
|
+
WinElement.GetParent(target, upLevels=1, searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
356
|
+
|
357
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
358
|
+
:param upLevels: [可选参数]父元素层级,1为父元素,2为祖父元素,3为曾祖父元素,以此类推,0为当前元素的顶层窗口元素。默认1
|
359
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
360
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
361
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
362
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
363
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
364
|
+
:return: 目标元素对象的上一层父级元素 或 顶层父级元素
|
365
|
+
"""
|
366
|
+
@staticmethod
|
367
|
+
def GetSibling(target: str | uia.Control, position: str = 'next', searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> uia.Control | None:
|
368
|
+
'''
|
369
|
+
获取相邻元素
|
370
|
+
|
371
|
+
WinElement.GetSibling(target, position="next", searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
372
|
+
|
373
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
374
|
+
:param position: [可选参数]相邻位置。下一个:"next" 上一个:"previous"。默认"next"
|
375
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
376
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
377
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
378
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
379
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
380
|
+
:return: 目标元素对象的下一个相邻元素对象 或 上一个相邻元素对象,没有返回None
|
381
|
+
'''
|
382
|
+
@staticmethod
|
383
|
+
def Exists(target: str | uia.Control, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool:
|
384
|
+
"""
|
385
|
+
判断元素是否存在
|
386
|
+
|
387
|
+
WinElement.Exists(target, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
388
|
+
|
389
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
390
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
391
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
392
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
393
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
394
|
+
:return: bool
|
395
|
+
"""
|
396
|
+
@staticmethod
|
397
|
+
def GetCheck(target: str | uia.Control, searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool:
|
398
|
+
"""
|
399
|
+
获取元素勾选
|
400
|
+
|
401
|
+
WinElement.GetCheck(target, searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
402
|
+
|
403
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
404
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
405
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
406
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
407
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
408
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
409
|
+
:return: bool
|
410
|
+
"""
|
411
|
+
@staticmethod
|
412
|
+
def SetCheck(target: str | uia.Control, isCheck: bool = True, searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool:
|
413
|
+
"""
|
414
|
+
设置元素勾选
|
415
|
+
|
416
|
+
WinElement.SetCheck(target, isCheck=True, searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
417
|
+
|
418
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
419
|
+
:param isCheck: [可选参数]设置勾选:True 设置取消勾选:False。默认True
|
420
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
421
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
422
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
423
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
424
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
425
|
+
:return: 执行成功返回True,执行失败返回False
|
426
|
+
"""
|
427
|
+
@staticmethod
|
428
|
+
def GetSelect(target: str | uia.Control, mode: str = 'text', searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str | int:
|
429
|
+
'''
|
430
|
+
获取元素选择
|
431
|
+
|
432
|
+
WinElement.GetSelect(target, mode=\'text\', searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
433
|
+
|
434
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
435
|
+
:param mode: [可选参数]获取文本:"text" 获取序号:“index” 获取值:“value”。默认"text"
|
436
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
437
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
438
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
439
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
440
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
441
|
+
:return: 已选项的文本 或 序号 或 值,没有则返回None
|
442
|
+
'''
|
443
|
+
@staticmethod
|
444
|
+
def SetSelect(target: str | uia.Control, option: str | int, mode: str = 'text', searchDelay: int = 10000, anchorsElement: uia.Control = None, setForeground: bool = True, cursorPosition: str = 'center', cursorOffsetX: int = 0, cursorOffsetY: int = 0, simulateType: str = 'simulate', continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
445
|
+
'''
|
446
|
+
设置元素选择
|
447
|
+
|
448
|
+
WinElement.SetSelect(target, \'\', mode="text", searchDelay=10000, anchorsElement=None, setForeground=True, cursorPosition=\'center\', cursorOffsetX=0, cursorOffsetY=0, simulateType=\'simulate\', continueOnError=False, delayAfter=100, delayBefore=100)
|
449
|
+
|
450
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
451
|
+
:param option: [必选参数]选择选项的文本或者序号
|
452
|
+
:param mode: [可选参数]选择文本:"text" 选择序号:“index” 选择值:“value”。默认"text"
|
453
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
454
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
455
|
+
:param setForeground: [可选参数]激活窗口。默认True
|
456
|
+
:param cursorPosition: [可选参数]光标在选中项的位置。中心:"center" 左上角:"topLeft" 右上角:"topRight" 左下角:"bottomLeft" 右下角:"bottomRight"。默认"center"
|
457
|
+
:param cursorOffsetX: [可选参数]横坐标偏移。默认0
|
458
|
+
:param cursorOffsetY: [可选参数]纵坐标偏移。默认0
|
459
|
+
:param simulateType: [可选参数]鼠标点击选中项时的模式。模拟操作:"simulate" 消息操作:"message"。默认"simulate"
|
460
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
461
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
462
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
463
|
+
:return: None
|
464
|
+
'''
|
465
|
+
@staticmethod
|
466
|
+
def GetValue(target: str | uia.Control, getMethod: str = 'auto', searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> str:
|
467
|
+
'''
|
468
|
+
获取元素文本
|
469
|
+
|
470
|
+
WinElement.GetValue(target, getMethod="auto", searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
471
|
+
|
472
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
473
|
+
:param getMethod: [可选参数]获取方式。自动方式:"auto" 获得元素Name方式:"name" 获得元素Value方式:"value" 获得元素Text方式:"text"。默认"auto"
|
474
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
475
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
476
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
477
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
478
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
479
|
+
:return: 元素文本
|
480
|
+
'''
|
481
|
+
@staticmethod
|
482
|
+
def SetValue(target: str | uia.Control, value: str, searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
483
|
+
'''
|
484
|
+
设置元素文本
|
485
|
+
|
486
|
+
WinElement.SetValue(target, "", searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
487
|
+
|
488
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
489
|
+
:param value: [必选参数]要写入元素的文本内容
|
490
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
491
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
492
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
493
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
494
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
495
|
+
:return: None
|
496
|
+
'''
|
497
|
+
@staticmethod
|
498
|
+
def GetRect(target: str | uia.Control, relativeType: str = 'parent', searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> dict:
|
499
|
+
'''
|
500
|
+
获取元素区域
|
501
|
+
|
502
|
+
WinElement.GetRect(target, relativeType="parent", searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
503
|
+
|
504
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
505
|
+
:param relativeType: [可选参数]返回元素位置是相对于哪一个坐标而言的。 相对父元素:"parent" 相对窗口客户区:"root" 相对屏幕坐标:"screen"。默认"parent"
|
506
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
507
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
508
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
509
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
510
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
511
|
+
:return: {"height" : int, "width" : int, "x" : int, "y" : int}
|
512
|
+
'''
|
513
|
+
@staticmethod
|
514
|
+
def ScreenCapture(target: str | uia.Control, filePath: str, rect: dict = None, searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> bool:
|
515
|
+
'''
|
516
|
+
元素截图
|
517
|
+
|
518
|
+
WinElement.ScreenCapture(target, \'D:/1.png\', rect=None, searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
519
|
+
|
520
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
521
|
+
:param filePath: [必选参数]图片存储的绝对路径。如 \'D:/1.png\'(支持图片保存格式:bmp、jpg、jpeg、png、gif、tif、tiff)
|
522
|
+
:param rect: [可选参数]对指定界面元素截图的范围,若传None,则截取该元素的全区域。若传{"x":int,"y":int,"width":int,"height":int},则以该元素左上角位置偏移x,y的坐标为原点,根据高宽进行截图。默认None
|
523
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
524
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
525
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
526
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
527
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
528
|
+
:return: bool(截图成功返回True,否则返回假)
|
529
|
+
'''
|
530
|
+
@staticmethod
|
531
|
+
def Wait(target: str | uia.Control, waitType: str = 'show', searchDelay: int = 10000, anchorsElement: uia.Control = None, continueOnError: bool = False, delayAfter: int = 100, delayBefore: int = 100) -> None:
|
532
|
+
'''
|
533
|
+
等待元素(等待元素显示或消失)
|
534
|
+
|
535
|
+
WinElement.Wait(target, waitType=\'show\', searchDelay=10000, anchorsElement=None, continueOnError=False, delayAfter=100, delayBefore=100)
|
536
|
+
|
537
|
+
:param target: [必选参数]tdRPA拾取器获取的目标元素特征字符串或uia目标元素对象
|
538
|
+
:param waitType: [可选参数]等待方式。 等待显示:"show" 等待消失:"hide"。默认"show"
|
539
|
+
:param searchDelay: [可选参数]超时时间(毫秒)。默认10000
|
540
|
+
:param anchorsElement: [可选参数]锚点元素,从它开始找,不传则从桌面顶级元素开始找(有值可提高查找速度)。默认None
|
541
|
+
:param continueOnError: [可选参数]错误继续执行。默认False
|
542
|
+
:param delayAfter: [可选参数]执行后延时(毫秒)。默认100
|
543
|
+
:param delayBefore: [可选参数]执行前延时(毫秒)。默认100
|
544
|
+
:return: None
|
545
|
+
'''
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: tdrpa.tdworker
|
3
|
-
Version: 1.2.13.
|
3
|
+
Version: 1.2.13.50
|
4
4
|
Summary: tdworker for tdrpa developers. supports python3.8+, windows x64
|
5
5
|
Home-page: https://gitee.com/tdworker/command/wikis
|
6
6
|
Author: vx:RPA_CREATOR
|
@@ -10,7 +10,7 @@ Keywords: rpa,RPA,tdRPA,tdworker,rpaworker,worker,uiautomation,uia,creator,windo
|
|
10
10
|
Platform: Windows Only
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: Operating System :: Microsoft :: Windows
|
13
|
-
Requires-Dist: tdrpa.tdcore>=1.2.
|
13
|
+
Requires-Dist: tdrpa.tdcore>=1.2.19
|
14
14
|
Requires-Dist: pywin32
|
15
15
|
Requires-Dist: pyperclip
|
16
16
|
Requires-Dist: WMI
|
@@ -1,4 +1,4 @@
|
|
1
|
-
tdrpa/tdworker.cp310-win_amd64.pyd,sha256=
|
1
|
+
tdrpa/tdworker.cp310-win_amd64.pyd,sha256=8wgcops6-BVov1lwh9e2LS-SxHpjHDaARStQRHMdebY,4586496
|
2
2
|
tdrpa/_tdxlwings/__init__.py,sha256=mxmqGWQ7xFb6e1GqkKEBfMQtZ8YyO4kAcPOvcJnD_2k,4424
|
3
3
|
tdrpa/_tdxlwings/_win32patch.py,sha256=_IxTfvj663osTXh8b1S-A_N4PthS9gEWFLjpY4V0iUA,3443
|
4
4
|
tdrpa/_tdxlwings/_xlmac.py,sha256=23OusKchbqglFi1s909tbB9fIwoFj6Yny4GiYrsnx5s,68521
|
@@ -82,20 +82,12 @@ tdrpa/_tdxlwings/quickstart_fastapi/requirements.txt,sha256=y3pL1maFFVyROPGnd2YD
|
|
82
82
|
tdrpa/_tdxlwings/rest/__init__.py,sha256=Dk7m0qKA9yIswBm_66Vw1MHmiiYRmqZ3egAUIMjUjts,41
|
83
83
|
tdrpa/_tdxlwings/rest/api.py,sha256=yfv1VkTpjQOzxLh4aMnZQsh8wTRHg34KkyipKDa_w4g,12885
|
84
84
|
tdrpa/_tdxlwings/rest/serializers.py,sha256=ztMzL_EgbhAb3rSbfWFE2A9uyOykoZbkSoDHPeKXzGg,2885
|
85
|
-
tdrpa/tdworker/__init__.pyi,sha256=
|
86
|
-
tdrpa/tdworker/_clip.pyi,sha256=BkWLBBqyoRMTP-Tm_BP4cN4O8vNo5mYBYOEdexW1-UA,1500
|
85
|
+
tdrpa/tdworker/__init__.pyi,sha256=SduurI_bQlVhaYqqASK1WjfgBdbupOrdMnK4eOTdxeo,336
|
87
86
|
tdrpa/tdworker/_excel.pyi,sha256=ZTtS3A4bW-vlZEGRZm3FtvG9zRU-n_aWRj1W1xLoBbM,67332
|
88
|
-
tdrpa/tdworker/
|
89
|
-
tdrpa/tdworker/
|
90
|
-
tdrpa/tdworker/
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
tdrpa/tdworker/_winE.pyi,sha256=s5IHyB4zLyshyvcPEEjaY-Vdyy02E1fnECASzXUsFZY,17557
|
96
|
-
tdrpa/tdworker/_winK.pyi,sha256=lH1_smTsfHQVDaREOy37cb1Ied8zlKo6Q20oc1GXBGc,5407
|
97
|
-
tdrpa/tdworker/_winM.pyi,sha256=E_PJm6cLgpkqy7fcD6CMNlSS31xVmE1N31DP1Cj47yI,7938
|
98
|
-
tdrpa_tdworker-1.2.13.9.dist-info/METADATA,sha256=2alfUoxCUh9vBYDUh7XBd8G2HCKIRojJwMKekiXyDmk,1163
|
99
|
-
tdrpa_tdworker-1.2.13.9.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
100
|
-
tdrpa_tdworker-1.2.13.9.dist-info/top_level.txt,sha256=S9UoqmC_cyGqKbGsBkLQPEeQLbDrWD0SRwbxPpQpyyU,6
|
101
|
-
tdrpa_tdworker-1.2.13.9.dist-info/RECORD,,
|
87
|
+
tdrpa/tdworker/_other.pyi,sha256=9sKCQoqHmNE1Fvi2dTFhWH7xEuzTJCcCs501BH8bCHc,39143
|
88
|
+
tdrpa/tdworker/_web.pyi,sha256=8NDI7COti61cdJSnUjJpogZazKw9dfuc3J923k4KX0k,69739
|
89
|
+
tdrpa/tdworker/_win.pyi,sha256=bNF_mMn0Cc8tA1nMAX555EtL0f5HCy08AEHsRM1TAP8,36049
|
90
|
+
tdrpa_tdworker-1.2.13.50.dist-info/METADATA,sha256=iMISN9z1tm7xA78GraV39QyREj2_6xWU_h4VNvF-jIY,1164
|
91
|
+
tdrpa_tdworker-1.2.13.50.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
92
|
+
tdrpa_tdworker-1.2.13.50.dist-info/top_level.txt,sha256=S9UoqmC_cyGqKbGsBkLQPEeQLbDrWD0SRwbxPpQpyyU,6
|
93
|
+
tdrpa_tdworker-1.2.13.50.dist-info/RECORD,,
|
tdrpa/tdworker/_clip.pyi
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
class Clipboard:
|
2
|
-
@staticmethod
|
3
|
-
def GetText():
|
4
|
-
"""
|
5
|
-
读取剪贴板文本
|
6
|
-
|
7
|
-
Clipboard.GetText()
|
8
|
-
|
9
|
-
:return:剪贴板的文本内容
|
10
|
-
"""
|
11
|
-
@staticmethod
|
12
|
-
def SaveImage(savePath: str):
|
13
|
-
'''
|
14
|
-
保存剪贴板图像
|
15
|
-
|
16
|
-
Clipboard.SaveImage(savePath)
|
17
|
-
|
18
|
-
:param savePath:[必选参数]要将剪贴板的图像保存到的文件路径,如"D:\\1.png"
|
19
|
-
:return:图像保存成功返回True,保存失败返回False
|
20
|
-
'''
|
21
|
-
@staticmethod
|
22
|
-
def SetFile(paths: str | list):
|
23
|
-
'''
|
24
|
-
文件设置到剪贴板
|
25
|
-
|
26
|
-
Clipboard.SetFile(paths)
|
27
|
-
|
28
|
-
:param paths:[必选参数]文件的路径,单个文件用字符串类型,如"D:\x01.txt",多个文件用 list 类型,其中每个元素用字符串,如["D:\x01.txt", "D:\x01.png"]
|
29
|
-
:return:成功返回True,失败返回False
|
30
|
-
'''
|
31
|
-
@staticmethod
|
32
|
-
def SetImage(picPath):
|
33
|
-
'''
|
34
|
-
图片设置到剪贴板
|
35
|
-
|
36
|
-
Clipboard.SetImage(picPath)
|
37
|
-
|
38
|
-
:param picPath:[必选参数]要放入剪贴板的图片路径,如"D:\\1.png"
|
39
|
-
:return:成功返回True,失败返回False
|
40
|
-
'''
|
41
|
-
@staticmethod
|
42
|
-
def SetText(content: str = ''):
|
43
|
-
'''
|
44
|
-
设置剪贴板文本
|
45
|
-
|
46
|
-
Clipboard.SetText(\'\')
|
47
|
-
|
48
|
-
:param content:[必选参数]新的剪贴板文本内容,默认""
|
49
|
-
:return:成功返回True,失败返回False
|
50
|
-
'''
|