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
import  os

import  time

import pyautogui as pag

try:

    while True:

        print("Press Ctrl-C to end")

        screenWidth, screenHeight = pag.size()  #获取屏幕的尺寸

        print(screenWidth,screenHeight)

        x,y = pag.position()   #获取当前鼠标的位置

        posStr = "Position:" + str(x).rjust(4)+','+str(y).rjust(4)

        print(posStr)

        time.sleep(0.2)

        os.system('cls')   #清楚屏幕

except KeyboardInterrupt:

    print('end....')
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import time

import pyautogui



def click_operation():

    """点击操作"""

    for i in range(2000):



        # 鼠标需要移动到的位置

        x, y = 1396, 850

        x1, y1 = 182,24

        pyautogui.moveTo(x1, y1)

        pyautogui.click()

        time.sleep(5)

        x2, y2 = 120,317

        pyautogui.moveTo(x2, y2)

        pyautogui.click()

        time.sleep(5)

        x3, y3 = 115,363

        pyautogui.moveTo(x3, y3)

        pyautogui.click()

        time.sleep(5)

        time.sleep(200)

        x11, y11=357,22

        pyautogui.moveTo(x11, y11)

        pyautogui.click()

        time.sleep(5)

        x12, y12=97,320

        pyautogui.moveTo(x12, y12)

        pyautogui.click()

        time.sleep(5)

        x13, y13=115, 508

        pyautogui.moveTo(x13, y13)

        pyautogui.click()

        time.sleep(5)

        x14, y14=160,560

        pyautogui.moveTo(x14, y14)

        pyautogui.click()

        time.sleep(10)

click_operation()