pip install Pyinstaller
当然首先要安装pyinstaller这个包然后才能使用啦
这是一个自动玩别踩白块的python程序的简单实现
***
https://u.ali213.net/games/doNotTouchWhite/index.html?game_code=181
***
这个是网址,感兴趣的话可以尝试一下,但不能保证一定成功。因为该程序通过不断截图判断颜色来实现。而这个截图的大小是根据浏览器设置和分辨率大小而变化的。(本人1920*1080)
# coding=utf-8
import pyautogui
import time
def auto():
pyautogui.FAILSAFE=True
time.sleep(3)
while True:
screenshot()
def screenshot():
im=pyautogui.screenshot(region=(540,575,840,88))
im.save('test.png')
for i in range(40,840,210):
px=im.getpixel((i,10))
if px[0]==51:
pyautogui.click(540+i,585)
br