摘要: import time,win32gui import pyautogui time.sleep(2) handle1 = win32gui.GetForegroundWindow() #GetForegroundWindow使用此方法返回一个句柄di保存在handle1 print("显示当前句柄 阅读全文
posted @ 2023-05-11 19:31 十二点零一分十一秒 阅读(45) 评论(0) 推荐(0)
摘要: import win32api, win32con, time, random def move_click(x, y, t=0): # 移动鼠标并点击左键 win32api.SetCursorPos((x, y)) # 设置鼠标位置(x, y) print(x,y) # 执行左单键击,若需要双击则 阅读全文
posted @ 2023-05-11 19:25 十二点零一分十一秒 阅读(65) 评论(0) 推荐(0)
摘要: # 计算两个图像的汉明距离 def hamming(hash1, hash2, n=10): b = False assert len(hash1) == len(hash2) if sum(ch1 != ch2 for ch1, ch2 in zip(hash1, hash2)) < n: b = 阅读全文
posted @ 2023-04-09 16:11 十二点零一分十一秒 阅读(51) 评论(0) 推荐(0)
摘要: from PIL import Image # 获得图像的hash值 def get_hash(img): img = img.resize((16, 16), Image.Resampling.LANCZOS).convert('L') # 抗锯齿 灰度 # img.show() avg = su 阅读全文
posted @ 2023-04-09 15:43 十二点零一分十一秒 阅读(181) 评论(0) 推荐(0)
摘要: import win32conimport win32api, win32gui,win32ui #cx: 想点击位置的第一个位置,例如要点击句柄内(200,300)位置,就输入200 #cy:想点击位置的二个位置,例如要点击句柄内(200,300)位置,就输入300 #hwnd:输入句柄id #t 阅读全文
posted @ 2023-04-09 15:30 十二点零一分十一秒 阅读(1121) 评论(0) 推荐(0)
摘要: import timeimport win32gui,win32ui,win32conimport numpy as npimport cv2from PIL import ImageGrab, Imageimport ctypes def window_capture(hwnd,xSrc, ySr 阅读全文
posted @ 2023-04-09 00:05 十二点零一分十一秒 阅读(1176) 评论(0) 推荐(0)
摘要: #include <ESP8266WiFi.h> // 本程序使用 ESP8266WiFi库 #include <ESP8266WiFiMulti.h> // ESP8266WiFiMulti库 #include <ESP8266WebServer.h> // ESP8266WebServer库 # 阅读全文
posted @ 2022-05-27 12:59 十二点零一分十一秒 阅读(323) 评论(0) 推荐(0)