截屏工具 https://github.com/asweigart/pyscreeze

天问 4d5b7ff71d Update 'README.md' 8 months ago
README.md 4d5b7ff71d Update 'README.md' 8 months ago

README.md

pyscreeze

截屏工具

Usage

import pyscreeze
im1 = pyscreeze.screenshot()
im2 = pyscreeze.screenshot('my_screenshot.png')

可以截图,找到指定按钮,模拟操作等

如屏幕中按钮图片calc7key.png,通过locateOnScreen找到图片位置,返回左上角坐标和宽高

button7location = pyscreeze.locateOnScreen('calc7key.png')
button7x, button7y = pyscreeze.center(button7location)