常见问题

pyautogui 模拟鼠标键盘
win32gui 句柄等等
win32api 句柄等等
PIL 图片处理

pip install 报错: 尝试用powershell(管理员)下载
使用coderunner前先按ctrl+s保存

pyautogui程序无效:使用powershell(管理员)打开程序

PIL查看图片: im.show()

box = (1, 1, 100, 100) #两角坐标
im = ImageGrab(box)

查看某个像素的rgb:

im = Image.open('image.gif')
rgb_im = im.convert('RGB')
r, g, b = rgb_im.getpixel((1, 1))
print(r, g, b)
(65, 100, 137)
函数语法
range(stop)
range(start, stop[, step])
参数说明:

start: 计数从 start 开始。默认是从 0 开始。例如range(5)等价于range(0, 5);
stop: 计数到 stop 结束,但不包括 stop。例如:range(0, 5) 是[0, 1, 2, 3, 4]没有5
step:步长,默认为1。例如:range(0, 5) 等价于 range(0, 5, 1)

import隔壁文件夹的文件:

import sys
sys.path.append("E:\zrhlearn\dlgo")
from gotypes import Point
posted @ 2021-04-30 22:16  __ZRH  阅读(107)  评论(0)    收藏  举报