MCP ExplorerExplorer

Cursor Auto Accept

@ggbook123on 5 days ago
2 MIT
FreeCommunity
AI Systems
Make the cursor automatically click the accept button like augment. When used together with Mcp mentioned in the introduction, it can automatically complete the project.

Overview

What is Cursor Auto Accept

Cursor Auto Accept is an automation tool designed to enhance development efficiency by automatically recognizing and clicking ‘Accept’ buttons on the screen using image template matching technology. It operates in full-screen mode, providing a simple and effective solution without complex window detection requirements.

Use cases

This tool is ideal for developers who frequently work with applications requiring repetitive clicks on ‘Accept’ buttons, such as confirmation dialogs or approval prompts in development tools like Cursor AI. It can significantly reduce manual interactions and streamline workflows, especially when paired with task management tools like shrimp-task-manager.

How to use

To use the tool, download the complete project and open it with Cursor to set up the environment. Run the ‘Quick Launcher.bat’ to start the application and press F2 to begin or stop the execution. Load button templates if the interface changes in future updates to ensure accurate recognition.

Key features

Key features include full-screen template matching, global hotkey control for starting/stopping, a test mode for previewing without executing clicks, real-time status monitoring, persistent configuration settings, and an integrated screenshot tool for creating button templates quickly.

Where to use

Cursor Auto Accept can be used primarily in Windows environments (Windows 10 and 11) where programming tasks involve repetitive confirmation dialogs. It is suitable for developers using Cursor AI and similar programming platforms to automate tedious interactions and improve overall productivity.

Content

Cursor Auto Accept - 自动点击程序

让CURSOR能像AUGMENT一样能够自动执行的小软件。

一个基于图像模板匹配技术的智能按钮自动识别与点击工具,专为Cursor AI编程助手设计,可自动识别并点击Accept按钮,提升开发效率。


快速使用说明:1、直接把整个项目代码下载,用cursor打开让cursor部署好本项目环境 2、点击快速启动器.bat文件运行 3按F2开始执行或者停止
其他补充:若cursor版本更新导致界面变化,在模板管理里截取cursor需要自动点击的地方,然后加载图片,保存即可。

注意CURSOR要保持在前台,不然识别不到!后续版本可能会优化!
额外介绍:若搭配shrimp-task-manager的MCP使用更佳,自动规划项目,自动执行完项目,开启连续模式。

以下是AI生成的介绍:

📋 项目简介

Cursor Auto Accept是一个专业的自动化工具,使用计算机视觉技术自动识别屏幕上的Accept按钮并执行点击操作。程序采用全屏模板匹配算法,无需复杂的窗口检测,具有更高的稳定性和可靠性。

🌟 核心特性

  • 🎯 全屏模板匹配:在整个屏幕范围内搜索目标按钮,无窗口依赖限制
  • 🔄 顺序模板遍历:支持多个模板按预设顺序检测和点击
  • 🔥 全局热键控制:F2快捷键一键启动/停止监听
  • 🧪 测试模式:预览检测结果而不执行实际点击操作
  • 📊 实时状态监控:详细的日志记录和运行状态显示
  • ⚙️ 配置持久化:自动保存用户设置和模板配置
  • 🖼️ 模板截取工具:内置截图工具快速创建按钮模板

💻 环境要求

系统要求

  • 操作系统:Windows 11 (开发环境) / Windows 10 (兼容)
  • Python版本:Python 3.7 或更高版本
  • 屏幕分辨率:支持任意分辨率 (推荐1920x1080及以上)

依赖库

  • opencv-python>=4.5.0 - 图像处理和计算机视觉
  • pyautogui>=0.9.50 - 图形界面自动化
  • pywin32>=227 - Windows系统API
  • Pillow>=8.0.0 - 图像处理库
  • numpy>=1.20.0 - 数值计算库

🚀 快速开始

1. 环境部署

方法一:一键自动安装(推荐)

# 运行依赖安装脚本
.\安装依赖.bat

方法二:手动安装

# 安装Python依赖
pip install -r requirements.txt

2. 启动程序

方法一:使用启动器(推荐)

# 运行完整启动器
.\完整启动器.bat

方法二:直接启动

# 启动图像模板匹配版本
.\快速启动器.bat

# 或者直接运行Python脚本
python cursor-auto-clicker-template.py

方法三:PowerShell启动

# 使用PowerShell脚本启动
.\start_program.ps1

3. 创建桌面快捷方式

# 创建便捷的桌面快捷方式
.\创建桌面快捷方式.bat

📖 使用说明

基本操作流程

  1. 加载模板

    • 点击"模板管理"标签页
    • 使用"加载模板"按钮添加:Accept按钮、或者提示VPN、使用超过25次等导致cursor中断执行的图片。(默认已经配好)
    • 支持PNG、JPG等格式
  2. 配置参数

    • 点击间隔:设置检测到按钮后的点击间隔时间(秒)
    • 匹配阈值:调整模板匹配的相似度要求(0.5-1.0)
    • 测试模式:启用后只检测不点击,用于调试
  3. 开始监听

    • 点击"开始监听"按钮或按F2热键
    • 程序将开始全屏扫描匹配的按钮
    • 检测到目标后自动执行点击操作
  4. 停止监听

    • 点击"停止监听"按钮或再次按F2热键
    • 程序停止监听和点击操作

高级功能

🔥 全局热键

  • F2键:无论程序窗口是否在前台,都可以快速启动/停止监听

🧪 测试模式

  • 启用测试模式后,程序会显示检测结果但不执行实际点击

🖼️ 截取模板功能–当cursor更新导致按钮位置变化等情况时,在这里截图,让软件能识别。

  • 使用内置截图工具快速创建按钮模板
  • 支持精确的区域选择和自动保存

📊 实时监控

  • 查看详细的检测日志和运行状态

📁 项目目录结构

cursor-auto-accept/
├── cursor-auto-clicker-template.py    # 主程序文件
├── requirements.txt                   # Python依赖配置
├── template_config.json              # 程序配置文件
├── README.md                         # 项目文档
├── 
├── 启动脚本/
│   ├── 完整启动器.bat                # 程序启动器
│   ├── 快速启动器.bat                # 直接启动脚本
│   ├── start_program.ps1             # PowerShell启动脚本
│   ├── 安装依赖.bat                  # 依赖安装脚本
│   └── 创建桌面快捷方式.bat          # 快捷方式创建脚本
├── 
├── templates/                        # 模板图片文件夹
│   ├── cursor.png                   # Cursor按钮模板
│   └── *.png                        # 其他模板文件
├── 
├── window_templates/                 # 窗口模板文件夹
│   └── *.png                        # 窗口相关模板
├── 
├── 日志文件/
│   ├── cursor_template_clicker.log   # 主程序日志
│   └── cursor_auto_clicker.log       # 运行日志
└── 
└── __pycache__/                      # Python缓存文件

⚙️ 配置说明

模板配置 (template_config.json)

匹配阈值说明

  • 0.9-1.0:极高精度,要求非常精确的匹配
  • 0.8-0.9:高精度,推荐设置范围
  • 0.7-0.8:中等精度,适用于按钮变化较大的情况
  • 0.5-0.7:低精度,可能产生误匹配

🔧 故障排除

常见问题

1. 程序无法检测到按钮

  • 检查模板质量:确保模板图片清晰、完整
  • 调整匹配阈值:降低阈值到0.7-0.8
  • 使用测试模式:验证检测逻辑是否正常
  • 更新模板:重新截取当前状态下的按钮模板

2. 点击位置不准确

  • 检查DPI设置:确保系统DPI缩放设置正确
  • 重新截取模板:使用内置截图工具更新模板
  • 调整点击延迟:增加点击间隔时间

3. 程序启动失败

  • 检查Python环境:确保Python 3.7+已正确安装
  • 安装依赖:运行 安装依赖.bat 重新安装依赖包
  • 权限问题:以管理员身份运行程序

4. 热键无效

  • 检查键盘冲突:确保F2键未被其他程序占用
  • 重启程序:关闭程序后重新启动
  • 系统权限:以管理员权限运行程序

📝 版本历史

v2.0.0 (当前版本)

  • ✅ 全屏模板匹配算法
  • ✅ 顺序模板遍历功能
  • ✅ F2全局热键支持
  • ✅ 测试模式和调试功能
  • ✅ 配置持久化
  • ✅ 图形化模板管理界面

v1.0.0 (历史版本)

  • ✅ 基础OCR文字识别功能
  • ✅ 窗口检测和点击功能

🤝 技术支持

系统要求

  • Windows 11 (开发环境)
  • Windows 10 (兼容支持)
  • Python 3.7+ 环境

技术栈

  • 图像处理:OpenCV, Pillow
  • GUI界面:tkinter
  • 系统集成:pywin32, pyautogui
  • 数值计算:numpy

📄 许可证

本项目仅供学习和个人使用,请勿用于商业用途。

🆘 获取帮助

如遇到问题或需要技术支持,请:

  1. 查看日志文件:检查 cursor_template_clicker.log 中的错误信息
  2. 使用测试模式:启用测试模式进行问题诊断
  3. 检查配置文件:确认 template_config.json 配置正确
  4. 重新安装依赖:运行 安装依赖.bat 脚本

🎯 让AI编程助手体验更流畅,提升开发效率!

Tools

No tools

Comments