forked from ramwin/python-reference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmouse有道词典.py
More file actions
36 lines (33 loc) · 846 Bytes
/
mouse有道词典.py
File metadata and controls
36 lines (33 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from PyWinMouse import *
import time
"""
windows下把有道云笔记的单词设置成记住的代码
"""
def main(n=10):
print("move your mouse to 点击显示释义")
time.sleep(3)
a = Mouse()
center = a.get_mouse_pos()
print("move your mouse to 记得")
time.sleep(3)
checked = a.get_mouse_pos()
for i in range(n):
time.sleep(0.01)
a.move_mouse(*center)
time.sleep(0.01)
a.left_click()
time.sleep(0.01)
a.move_mouse(*checked)
time.sleep(0.01)
a.left_click()
def cheet():
a = Mouse()
start = time.time()
for _ in range(123):
a.left_click()
a.left_click()
end = time.time()
print(end-start)
number = input("输入你要执行的次数: ")
number = int(number)
main(number)