Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the automatic click of general games by python

Shulou Source: shulou.com Published: 2022-06-03 05:02:43 10月02日 Update

This article mainly explains "how to realize the automatic click of general games by python". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "python how to achieve the automatic click of the general game" bar!

Required software:

Pycharm (pycharm installation steps)

Sandboxie software, for example: sandbox (Baidu search self-installation, if necessary can leave a message), 360isolation sandboxie

Your game.

Specific operations:

Use sandboxie software to open desktop games

Open the pycharm software to copy the following code, right-click Run to run

Go back to the game, place the mouse in the upper left corner of the button, wait for the output of the Xbox, move the mouse to the lower right corner of the button.

The game can be played automatically.

The code is as follows: import randomimport pyautoguiimport timetime.sleep (3) lupX, lupY = pyautogui.position () # get the coordinate value of the upper left corner of the game button print (flip X = {lupX}, Y = {lupY}') time.sleep (2) # wait for 2srdownX, rdownY = pyautogui.position () # get the coordinate value of the lower right corner of the game button print (flip X1 = {rdownX}, Y1 = {rdownY}') while True: X = random.randint (lupX, rdownX) # take the random value Between lupx and rdownx, the following is the same as y = random.randint (lupY, rdownY) pyautogui.click (xonomx, yyogy, duration=0.5) # Mouse click on XMagi y time.sleep (1.5) # delay 1.5s can be modified to this, I believe you have a deeper understanding of "python how to achieve the automatic click of the general game", might as well come to the actual operation! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Buttons software mouse code content upper left corner marked value learning practical deeper between interest practicality practical easy to operate method more friends desktop steps Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information Linux Shulou Technology MariaDB