{"id":24419105,"url":"https://github.com/electroluxcode/rpa-tool","last_synced_at":"2025-12-31T14:10:35.799Z","repository":{"id":270895403,"uuid":"910868797","full_name":"electroluxcode/rpa-tool","owner":"electroluxcode","description":"一个专门为rpa设计的 tool，支持python和exe直接运行。 暂时只支持PC端 window和移动端 android","archived":false,"fork":false,"pushed_at":"2025-01-07T17:57:14.000Z","size":26090,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T09:18:56.708Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electroluxcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-01T17:19:53.000Z","updated_at":"2025-01-04T06:32:24.000Z","dependencies_parsed_at":"2025-01-03T21:38:30.878Z","dependency_job_id":null,"html_url":"https://github.com/electroluxcode/rpa-tool","commit_stats":null,"previous_names":["electroluxcode/rpa-tool"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electroluxcode%2Frpa-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electroluxcode%2Frpa-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electroluxcode%2Frpa-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electroluxcode%2Frpa-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electroluxcode","download_url":"https://codeload.github.com/electroluxcode/rpa-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243411139,"owners_count":20286552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-20T09:18:59.330Z","updated_at":"2025-12-29T07:58:33.006Z","avatar_url":"https://github.com/electroluxcode.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\u003ch1\u003e\n\u003cbr/\u003e\n🔨 \n\u003cbr /\u003e\nrpa-tool\n\u003cbr /\u003e\u003cbr /\u003e\n\u003c/h1\u003e\n\u003csup\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003ca href=\"none\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=version\u0026message=v1.0.0\u0026color=blue\" alt=\"npm package\" /\u003e\u003c/a\u003e\u003ca href=https://space.bilibili.com/286773126\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=Bili\u0026message=Electrolux\u0026color=pink\" alt=\"temp\" /\u003e\u003c/a\u003e\n\u003ca href=\"none\"\u003e   \u003cimg src=\"https://img.shields.io/static/v1?label=Author\u0026message=Electrolux\u0026color=yellow\" alt=\"demos\" /\u003e\u003c/a\u003e\n\u003ca href=\"none\"\u003e   \u003cimg src=\"https://img.shields.io/static/v1?label=Contribute\u0026message=welcome\u0026color=green\" alt=\"demos\" /\u003e\u003c/a\u003e\n\u003cbr /\u003e\n\u003c/a\u003e\n\u003cbr /\u003e\n用于window和android系统上的rpa工具类实例\n\u003c/sup\u003e\n\u003c/div\u003e\n\n\n\n\n## Description\n\n支持识图点击，滑动，输入，按键操作等常规操作\n\n一个rpa常用方法的集成库 ，目前支持两个平台\n\n- window\n- android\n\n\n然后 有两种调用方式，\n\n- 通过python直接调用\n- 通过exe加上命令参数调用\n\n具体可以参考\n\n[PC端文档](./pcRPA/README.md)\n\n[移动端文档](./phoneRPA/README.md)\n\n\n\n##  Quickstart\n\nclone 仓库或者 从 https://github.com/electroluxcode/rpa-tool/releases 下载 exe文件(注意如果要运行手机端rpa需要在远端控制设备上安装adb)\n\n\n## Example\n\n\n\n手机识图示例, 具体的参数可以参考 phoneRPA\\phoneDataExample.json  这个json的文件\n```js\n\"data\": [\n    {\n        \"cmdType\": \"Click\",\n        \"cmdParam\": {\n            \"x\": 460,\n            \"y\": 450\n        }\n    },\n    {\n        \"cmdType\": \"ElementClick\",\n        \"cmdParam\": {\n            \"key\": \"text\",\n            \"value\": \"朋友圈\"\n        }\n    },\n    {\n        \"cmdType\": \"ImgClick\",\n        \"cmdParam\": \"button.jpg\"\n    },\n    {\n        \"cmdType\": \"Sleep\",\n        \"cmdParam\": 3\n    },\n    {\n        \"cmdType\": \"Swipe\",\n        \"cmdParam\": {\n            \"originX\": 960,\n            \"originY\": 950,\n            \"targetX\": 960,\n            \"targetY\": 600\n        }\n    },\n    {\n        \"cmdType\": \"ElementClick\",\n        \"cmdParam\": {\n            \"key\": \"text\",\n            \"value\": \"朋友圈\"\n        }\n    },\n    {\n        \"cmdType\": \"KeyEventInput\",\n        \"cmdParam\": \"BACK\"\n    },\n    {\n        \"cmdType\": \"TextInput\",\n        \"cmdParam\": \"BACK2222222\"\n    },\n    {\n        \"cmdType\": \"ImgCature\",\n        \"cmdParam\": \"ttttttttttt.jpg\"\n    },\n    {\n        \"cmdType\": \"AppStart\",\n        \"cmdParam\": \"com.tencent.mm/.ui.LauncherUI\"\n    }\n]\n```\n\n\n\n\u003cimg src = \"./img/mobile.gif\"\u003e\n\n\npc端识图参数可以参考 pcRPA\\pcDataExample.json  这个json的文件\n\n```js\n\n\"data\": [\n    {\n        \"cmdType\": \"Click\",\n        \"cmdParam\": {\n            \"x\": 100,\n            \"y\": 100,\n            \"clicks\": 2\n        }\n    },\n    {\n        \"cmdType\": \"Press\",\n        \"cmdParam\": {\n            \"keys\": \"enter\",\n            \"presses\": 1\n        }\n    },\n    {\n        \"cmdType\": \"MoveTo\",\n        \"cmdParam\": {\n            \"x\": 100,\n            \"y\": 100\n        }\n    },\n    {\n        \"cmdType\": \"DragTo\",\n        \"cmdParam\": {\n            \"x\": 100,\n            \"y\": 100\n        }\n    },\n    {\n        \"cmdType\": \"ImgClick\",\n        \"cmdParam\": {\n            \"imgPath\": \"button.jpg\"\n        }\n    },\n    {\n        \"cmdType\": \"Write\",\n        \"cmdParam\": {\n            \"message\": \"button.jpg\"\n        }\n    },\n    {\n        \"cmdType\": \"Scroll\",\n        \"cmdParam\": 10\n    },\n    {\n        \"cmdType\": \"KeyDown\",\n        \"cmdParam\": \"enter\"\n    },\n    {\n        \"cmdType\": \"KeyUp\",\n        \"cmdParam\": \"enter\"\n    },\n    {\n        \"cmdType\": \"ChineseWrite\",\n        \"cmdParam\": \"你好\"\n    }\n]\n```\n\n如果是想运行json数据，那么参考 example.json的数据，然后运行 pcRPA.py 和 phoneRPA.py 就可以了\n\n如果是想运行exe 和 cli.py, 使用示例如下 \n\n```js\nconst { exec } = require('child_process');\n\nconst data =  [\n  {\n    \"cmdType\": \"Click\",\n    \"cmdParam\": {\n        \"x\": 100,\n        \"y\": 100,\n        \"clicks\": 2\n    }\n},\n]\n\n  const normalJsonStr = JSON.stringify(data)\n  const escapedJsonStr = (normalJsonStr).replaceAll(\"\\\"\", \"\\\\\\\"\").replaceAll(\"\\\\\\\\\", \"\\\\\")\n  console.log(\"'\" +escapedJsonStr+ \"'\");\n  \n  exec('pcRPAToolCli.exe ' + escapedJsonStr, (error, stdout, stderr) =\u003e {\n    if (error) {\n      console.error(`执行的错误: ${error}`);\n      return;\n    }\n    console.log(`标准输出: ${stdout}`);\n    if (stderr) {\n      console.error(`标准错误输出: ${stderr}`);\n    }\n  });\n\n\n```\n\n\n\n\n\n\n\n## Struct\n\n```js\ntree /f \u003e list.txt 生成\n\n│  README.md // 总的readme\n│  \n├─pcRPA  // pc端 的  RPA\n│      pcData.json // 你的逻辑写在这里\n│      pcDataExample.json  // 所有示例的传参\n│      pcRPA.py   // RPA主文件   python pcRPA.py\n│      README.md // pc端 的 readme\n│      requirements.txt // 依赖文件\n│      test.py // 我的测试文件\n│      \n└─phoneRPA // 手机端的  RPA\n    │  button.jpg \n    │  output.png\n    │  phoneData.json // 你的逻辑写在这里\n    │  phoneDataExample.json // 所有示例的传参\n    │  phoneRPA.py // RPA主文件   python phoneRPA.py\n    │  phoneRPAFn.py // 本来想模块化的，结果发现虚拟环境(conda)和用exe真实环境的模块有出入，因此删掉了这个文件\n    │  README.md // 移动端 的 readme\n    │  requirements.txt  // 依赖文件\n    │  screen.png // 这就是你 手机上面的 截图 \n    │  test.py // 我的测试文件\n    │  ui.xml // ui的 xml 文件 也是 通过 adb 得到的 。 用来查找UI的属性 进行点击\n    │  \n    ├─adb\n    │      adb.zip  // 这玩意解压后 添加环境变量就好了\n    │      adb说明.md\n    │      element.sh\n    │      index.sh\n    │      index.txt\n    │      ls.txt\n    │      test.txt\n    │      \n    \n            \n\n```\n\n\n\n\n\n\n\n\n\n\n\n## Developer\n\n```js\n如果你想添加你自己的东西\n--1.在pcRPA.py 和 phoneRPA.py 中 的 mainWork中 添加事件\n--2.为了程序的可读性，可以在pcDataExample.json和 phoneDataExample.json中添加你的示例\n--3.只要在 pcData.json 和 phoneData.json 中 添加 你的参数 然后 python 你的文件.py就可以运行\n```\n\n\n\n\n\n\n\n## Badge\n\n[![Size](https://img.shields.io/static/v1?label=plugin\u0026message=electroluxRPA\u0026color=green)](https://gitee.com/Electrolux)\n\n```\n[![Size](https://img.shields.io/static/v1?label=plugin\u0026message=electroluxRPA\u0026color=green)](https://gitee.com/Electrolux)\n```\n\n\n\n## Support\n\nfrontEngineerPlugin is developed by me. Please use frontEngineerPlugin, star it on gitee or even become a [sponsor](https://gitee.com/Electrolux) to support us!\n\n\n\n## update","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectroluxcode%2Frpa-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectroluxcode%2Frpa-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectroluxcode%2Frpa-tool/lists"}