diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..00a13935670152e4df17fc556c2c1059b79d7134 --- /dev/null +++ b/README.en.md @@ -0,0 +1,116 @@ +# Auto-Clicker + +A graphical user interface-based auto-clicker application built with Java, allowing users to create and execute automated click macros. + +## Features + +- **Visual Configuration**: Configure click positions and parameters through an intuitive graphical interface. +- **Macro Group Management**: Support creating multiple macro groups, each containing multiple action steps. +- **Flexible Control**: Set the number of loops and maximum execution duration. +- **Cross-Platform Compatibility**: Written in Java, compatible with Windows, macOS, Linux, and other platforms. +- **Configuration Persistence**: Support exporting and importing macro configurations for easy saving and sharing. +- **One-Click Operations**: Provide quick buttons to start/stop all macros. + +## System Requirements + +- Java 8 or higher +- Operating System: Windows / macOS / Linux + +## Quick Start + +### Compile and Run + +1. Ensure the Java Development Kit (JDK) is installed. +2. Compile the project: + ```bash + javac -d out src/*.java + ``` +3. Run the application: + ```bash + java -cp out AutoClicker + ``` + +### Usage Instructions + +1. **Add a Macro Group**: Click the "Add New Macro Group" button on the interface to create a new macro group. +2. **Configure Click Steps**: + - Add multiple action steps within each macro group. + - Set click coordinates (X, Y). + - Select mouse button (Left/Right). + - Set click count. + - Set pause time between clicks (in milliseconds). +3. **Set Macro Parameters**: + - Loop Count: Number of times to repeat the entire macro group after completion. + - Max Duration: Maximum execution time for the macro group (in minutes). +4. **Start Execution**: Click the "Start All" button to begin executing all macro groups. +5. **Stop Execution**: Click the "Stop All" button to terminate all currently running macro groups. +6. **Save Configuration**: Use the "Export Configuration" feature to save the current macro group as a JSON file. +7. **Load Configuration**: Use the "Import Configuration" feature to load macro group configurations from a JSON file. + +## Main Components + +### ActionStep (Action Step) +Represents a single click action, containing: +- Coordinate position (X, Y) +- Mouse button type +- Click count +- Pause time between clicks + +### ActionStepPanel (Action Step Panel) +Graphical interface component for configuring a single action step, including: +- Coordinate input fields +- Mouse button selection dropdown +- Click count input field +- Pause time input field +- Coordinate capture button (to obtain the current mouse position) + +### MacroGroup (Macro Group) +Represents a collection of action steps, containing: +- List of multiple action steps +- Loop count +- Maximum execution duration + +### MacroGroupPanel (Macro Group Panel) +Graphical interface component for managing macro groups, including: +- Display of action step list +- Input for loop count +- Input for maximum duration +- Execution state controls + +### AutoClickerFrame (Main Window) +The application's main window, containing: +- Macro group container +- Toolbar buttons (Add Macro Group, Start/Stop All, Import/Export Configuration) + +## Configuration File Format + +Exported configuration files are in JSON format. Example structure: + +```json +[ + { + "steps": [ + { + "x": 100, + "y": 200, + "button": "LEFT", + "clickCount": 1, + "pauseAfterMs": 100 + } + ], + "loopCount": 5, + "maxDurationMin": 10 + } +] +``` + +## Notes + +- When using the coordinate capture feature, ensure the application window is active. +- It is recommended to use this tool in non-production or testing environments. +- Some applications may have anti-automation protection mechanisms. +- Set appropriate pause times to avoid excessive system load from rapid clicking. + +## License + +This project is licensed under an open-source license. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9da78eace01ff3b4ac354f6f90933c64f3299f3a --- /dev/null +++ b/README.md @@ -0,0 +1,118 @@ + + +# Auto-Clicker + +一个基于Java的图形界面自动点击器应用程序,允许用户创建和执行自动化点击宏。 + +## 功能特点 + +- **可视化配置**: 通过直观的图形界面配置点击位置和参数 +- **宏组管理**: 支持创建多个宏组,每个宏组包含多个操作步骤 +- **灵活控制**: 可设置循环次数和最大执行时长 +- **跨平台兼容**: 使用Java编写,支持Windows、macOS、Linux等平台 +- **配置持久化**: 支持导出和导入宏配置,方便保存和分享 +- **一键操作**: 提供启动/停止所有宏的快捷按钮 + +## 系统要求 + +- Java 8 或更高版本 +- 操作系统:Windows/macOS/Linux + +## 快速开始 + +### 编译运行 + +1. 确保已安装Java Development Kit (JDK) +2. 编译项目: + ```bash + javac -d out src/*.java + ``` +3. 运行程序: + ```bash + java -cp out AutoClicker + ``` + +### 使用说明 + +1. **添加宏组**: 点击界面上的"添加新宏组"按钮创建新的宏组 +2. **配置点击步骤**: + - 在每个宏组中添加多个操作步骤 + - 设置点击坐标(X、Y) + - 选择鼠标按钮(左键/右键) + - 设置点击次数 + - 设置点击间暂停时间(毫秒) +3. **设置宏参数**: + - 循环次数:设置宏组执行完毕后循环的次数 + - 最大时长:设置宏组的最大执行时间(分钟) +4. **启动执行**: 点击"启动所有"按钮开始执行所有宏组 +5. **停止执行**: 点击"停止所有"按钮终止所有正在执行的宏组 +6. **保存配置**: 使用"导出配置"功能将当前宏组保存为JSON文件 +7. **加载配置**: 使用"导入配置"功能从JSON文件加载宏组配置 + +## 主要组件 + +### ActionStep (操作步骤) +表示单个点击操作,包含: +- 坐标位置(X、Y) +- 鼠标按钮类型 +- 点击次数 +- 点击间暂停时间 + +### ActionStepPanel (操作步骤面板) +用于配置单个操作步骤的图形界面组件,包含: +- 坐标输入框 +- 鼠标按钮选择下拉框 +- 点击次数输入框 +- 暂停时间输入框 +- 坐标捕获按钮(用于获取鼠标当前位置) + +### MacroGroup (宏组) +表示一组操作步骤的集合,包含: +- 多个操作步骤列表 +- 循环次数 +- 最大执行时长 + +### MacroGroupPanel (宏组面板) +用于管理宏组的图形界面组件,包含: +- 步骤列表显示 +- 循环次数输入 +- 最大时长输入 +- 执行状态控制 + +### AutoClickerFrame (主窗口) +应用程序主窗口,包含: +- 宏组容器 +- 工具栏按钮(添加宏组、启动/停止所有、导入/导出配置) + +## 配置文件格式 + +导出的配置文件为JSON格式,示例结构: + +```json +[ + { + "steps": [ + { + "x": 100, + "y": 200, + "button": "LEFT", + "clickCount": 1, + "pauseAfterMs": 100 + } + ], + "loopCount": 5, + "maxDurationMin": 10 + } +] +``` + +## 注意事项 + +- 使用坐标捕获功能时,请确保程序窗口处于激活状态 +- 建议在非生产环境或测试应用程序中使用本工具 +- 某些应用程序可能具有防止自动操作的保护机制 +- 设置适当的暂停时间,避免过快的点击操作造成系统负担 + +## 许可证 + +本项目遵循开源许可证协议。 \ No newline at end of file