Home > other >  Python questions about pyautogui module
Python questions about pyautogui module

Time:10-10

I want to use pyautogui library software repeat click somewhere, but I don't know why open the software, the mouse will not move, and not just the simulator, other browsers, document of what can be, but in my own computer can click on the simulator, but others not,
The code is as follows:
The import pyautogui
The import time
Import the random
Time. Sleep (5)

While 1:
The scope of the challenge # box
X1=random. Randint (1333151)
Y1=random. Randint (702, 787)

The scope of # played box
X2=random. Randint (669110)
Y2=random. Randint (7) 1030107

The scope of # time
Time_pass1=random. Randint (50 zhongguo kuangye daxue)
Time_pass2=random. Randint (6, 10)

# automation range click time Settings and click
Pyautogui. Click (x1, y1)
Time. Sleep (time_pass1)
Pyautogui. Click (x2, y2)
Time. Sleep (time_pass2)
  • Related