Add your description here
Project description
qx-game-bot
Mac, Linux, Windows 跨平台桌面端游戏脚本框架
功能
- 键鼠模拟 ✅
- 键鼠录制 ✅
- sqlite 内存存储 ✅
- sqlite 数据库文件存储 ✅
- json 文件存储
- pickle 文件存储
- 键鼠播放 ✅
- 屏幕录制 ✅
- 图色匹配 ✅
- 文字 OCR 识别 ✅
- 屏幕 OCR ✅
- 图片 OCR ✅
- 怪物检测
- 目标跟踪
- 多线程任务
- 基于 web 的 GUI、中控
(先画饼, 慢慢实现...)
使用
from qx_game_bot import QxGameBotFramework
bot = QxGameBotFramework()
# 按键模拟
bot.delay(100).keyTap("enter").keyType("# Hello World")
bot.keyPress("cmd").keyPress("shift").keyPress("left")
bot.keyRelease("cmd").keyRelease("shift").keyRelease("left")
bot.keyTapAll("cmd", "c")
bot.keyTapAll("cmd", "enter")
bot.keyTapAll("cmd", "v")
bot.delay(1500)
# 鼠标模拟
# 双击左键 (100, 100)
bot.mouseClick('left', x=100, y=100, count=2)
# 移动到
bot.mouseMoveTo(500, 500)
# 滚动 y:500
bot.mouseScrollBy(0, dy=500)
# 录制键鼠
bot = QxGameBotFramework('data.db')
stopRecording = bot.recordTask("task1")
sleep(3)
stopRecording()
# 播放键鼠
bot = QxGameBotFramework('data.db')
bot.playRecordTask("task1")
# 图色匹配
res = bot.matchAllScreen("e2e/apple.png")
res = bot.matchScreenColorPoint("#FFFFFF", 26, 13)
colorPoints = [("CA6179", 1431, 147), ("#FFFFFF", 26, 13)]
res = bot.matchScreenMultiColorPoints(colorPoints, condition="oneOfTrue")
# 屏幕OCR
res = bot.screenOcr(det_limit_side_len=3440)
# 图像OCR
res = bot.imgOcr("e2e/ocr/image.png")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qx_game_bot-0.1.4.tar.gz
(3.6 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qx_game_bot-0.1.4.tar.gz.
File metadata
- Download URL: qx_game_bot-0.1.4.tar.gz
- Upload date:
- Size: 3.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee782afed7218ac96e3251fc2d0556a6345fe5b399257aeb5a9120b4ef44e250
|
|
| MD5 |
cf6118bbc46b59a9fdccf5525f517cc0
|
|
| BLAKE2b-256 |
74a7c2823bf14cecfe59e1829bdb882fd48c6f36832c6cac4367bcce0170b986
|
File details
Details for the file qx_game_bot-0.1.4-py3-none-any.whl.
File metadata
- Download URL: qx_game_bot-0.1.4-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4e41c32e7ce62152367648b8b63b46568bb2a66b1d246b6afe6b26bfe50d0a4
|
|
| MD5 |
2f3f2d3becade3fd10fec13c78397932
|
|
| BLAKE2b-256 |
38659beba6b20793861422513cf48b4fb59a140613796df3ce0675ba8f413144
|