#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # #pip install pyautogui -i https://pypi.tuna.tsinghua.edu.cn/simple/ #pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple/ #pip install PyQt5 -i https://pypi.tuna.tsinghua.edu.cn/simple/ # #pip install pypiwin32 -i https://pypi.tuna.tsinghua.edu.cn/simple/ # #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ import pyautogui import cv2 import numpy as np import os ''' img = pyautogui.screenshot(region=[300,50,200,100]) img = cv2.cvtColor(np.asarray(img),cv2.COLOR_RGB2BGR) cv2.imshow("截屏",img) #cv2.waitKey(0) ''' from PyQt5.QtWidgets import QApplication import win32gui import sys import configconst import time print(configconst.SAVE_PATH) pt = configconst.SAVE_PATH #time.sleep(5) hwnd = win32gui.FindWindow(None, 'C:/Windows/system32/cmd.exe') app = QApplication(sys.argv) screen = QApplication.primaryScreen() img = screen.grabWindow(hwnd).toImage() import time dt = time.strftime("%Y-%m-%d_%H-%M-%S", time.localtime()) print(dt) #os.chdir(r"C:\Users\Administrator\Desktop\问题处理\images") #os.chdir(pt) if os.path.exists(pt): #os.chdir(r"C:\Users\Administrator\Desktop\问题处理\images") os.chdir(pt) print("dir ok") else: print("创建dir") os.makedirs(pt, exist_ok=True) os.chdir(pt) img.save("%s-screenshot.jpg"%(dt))
Set ws = CreateObject("Wscript.Shell") ws.run "cmd /c chk.bat",vbhide
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
2016-11-16 myecplise tomcat jdk
2016-11-16 myecplise 添加svn插件
2015-11-16 Rejected request from RFC1918 IP to public server address
2015-11-16 oem 密钥获取