摘要: from pynput import keyboard # 按下后执行 def on_press(key): try: if key == keyboard.KeyCode.from_char('enter'): pass elif key == keyboard.Key.left: print(" 阅读全文
posted @ 2022-09-29 17:25 小二君i 阅读(165) 评论(0) 推荐(0) 编辑
摘要: def window_capture_beat(hwnd,stayx:int,endx:int,stay:int,endy:int): hwndDC = win32gui.GetWindowDC(hwnd) mfcDC = win32ui.CreateDCFromHandle(hwndDC) sav 阅读全文
posted @ 2022-09-29 17:22 小二君i 阅读(816) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2022-09-29 17:19 小二君i 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #实时获取当前活动窗口的句柄及标题并输出至控制台 import win32gui while True: time.sleep(1) now_hwnd = win32gui.GetForegroundWindow() now_hwnd_title = win32gui.GetWindowText(n 阅读全文
posted @ 2022-09-29 17:17 小二君i 阅读(821) 评论(0) 推荐(0) 编辑
摘要: 图片来源:https://blog.csdn.net/caohongxing/article/details/120407381 实用实例: 1、截取图片 img = cv2.imread("img_path") img = img[y1:y2, x1:x2] 2、检查某个像素点的RGB img = 阅读全文
posted @ 2022-09-29 15:08 小二君i 阅读(75) 评论(0) 推荐(0) 编辑
摘要: import time import win32api import win32con import win32gui class Virtual_Keyboard(object): def __init__(self, hwnd): self.hwnd = hwnd self.hwnd_title 阅读全文
posted @ 2022-09-28 17:12 小二君i 阅读(3033) 评论(2) 推荐(1) 编辑
摘要: 1 #对后台窗口截图 2 import win32gui, win32ui, win32con 3 import cv2 4 import numpy as np 5 6 #获取后台窗口的句柄,注意后台窗口不能最小化 7 hWnd = win32gui.FindWindow("NotePad",No 阅读全文
posted @ 2022-09-28 13:26 小二君i 阅读(2035) 评论(0) 推荐(1) 编辑
摘要: 转载自https://www.cnblogs.com/codingmylife/archive/2010/06/06/1752807.html 1.性能 Py3.0运行 pystone benchmark的速度比Py2.5慢30%。Guido认为Py3.0有极大的优化空间,在字符串和整形操作上可 以 阅读全文
posted @ 2019-03-27 17:24 小二君i 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 将Yum源更改为阿里的镜像源 1. 备份原有yum源文件,以便日后恢复原有yum源 2.下载阿里的yum源文件(可更改最后数字以改版yum源版本) 3.清除缓存并生成新缓存 安装EPEL 阅读全文
posted @ 2019-03-26 17:20 小二君i 阅读(888) 评论(0) 推荐(0) 编辑
摘要: 错误 1 解决方法 在配置文件中添加hadoop的根目录即可,如: 错误 2 解决方法 添加内存 阅读全文
posted @ 2018-12-11 10:11 小二君i 阅读(7925) 评论(6) 推荐(1) 编辑