摘要:
from pynput import keyboard # 按下后执行 def on_press(key): try: if key == keyboard.KeyCode.from_char('enter'): pass elif key == keyboard.Key.left: print(" 阅读全文
摘要:
def window_capture_beat(hwnd,stayx:int,endx:int,stay:int,endy:int): hwndDC = win32gui.GetWindowDC(hwnd) mfcDC = win32ui.CreateDCFromHandle(hwndDC) sav 阅读全文
摘要:
import time import pyautogui def rgb2hex(r, g, b): return '#{:02x}{:02x}{:02x}'.format(r, g, b) try: width, height = pyautogui.size() while True: time 阅读全文
摘要:
#实时获取当前活动窗口的句柄及标题并输出至控制台 import win32gui while True: time.sleep(1) now_hwnd = win32gui.GetForegroundWindow() now_hwnd_title = win32gui.GetWindowText(n 阅读全文
摘要:
图片来源:https://blog.csdn.net/caohongxing/article/details/120407381 实用实例: 1、截取图片 img = cv2.imread("img_path") img = img[y1:y2, x1:x2] 2、检查某个像素点的RGB img = 阅读全文