Skip to main content

control the mouse and keyboard todo repeat jobs

Project description

python GUI 流程操作工具

介绍:

  • 让你的双手从重复的敲键盘点鼠标中解放!
  • 使用了pyautogui进行二次包装,用json文件进行任务安排
  • json 文件为字典列表,具体格式见下方
  • 在 linux 上功能更丰富

简要使用说明:

   安装:

$ pip install flowoperate  

   终端命令:

$ flowcmd /path_to_your/mission1.json [-l --loop] [-s --start_time] [-e --end_time]

# 显示帮助:  
$ colorit -h  
  • 参数解释:
    • -l --loop 是否循环执行
    • -s --start_time 循环执行的开始时间
    • -e --end_time 循环执行的结束时间

   代码中调用:

from flow_operate.flow_operation import FlowTool  

# 参数 operate_list 即为上面 json 文件 loads 后的列表
ft = FlowTool(operate_list=mission_list)  
ft.start()  

   json文件(任务文件)格式:

[  
  {  
    "name": "search image and click",  
    "method": "SearchClick",  
    "icon_path": "/root/... .../image.png",  
    "match_options": {  
      "threshold_value": 90,  
    "as_gray": true,  
    "as_binary": false,  
    "img_shape_times": 1.0  
  },  
  "speed": "fast",  
  "pre_delay": null,  
  "sub_delay": 2  
  },  
  {  
    "name": "search image with multi icons, if one of them matched, then click",  
  "method": "MulSearchClick",  
  "icon_paths": [  
      "/root/... .../image1.png",  
  "/root/... .../image2.png"  
  ],  
  "match_options": {  
      "threshold_value": 90,  
  "as_gray": true,  
  "as_binary": false,  
  "img_shape_times": 1.0  
  },  
  "speed": "fast",  
  "pre_delay": null,  
  "sub_delay": 2  
  },  
  {  
    "name": "open chrome and enter url",  
  "method": "EnterUrl",  
  "url": "http://www.xxx.com",  
  "speed": "fast",  
  "pre_delay": null,  
  "sub_delay": 2  
  },  
  {  
    "name": "wait the icon show",  
  "method": "WaitIcon",  
  "icon_path": "/root/... .../icon.png",  
  "match_options": {  
      "threshold_value": 90,  
  "as_gray": true,  
  "as_binary": false,  
  "img_shape_times": 1.0  
  },  
  "interval": 1,  
  "after_showed": "NextStep",  
  "time_out": 120,  
  "if_timeout": "End"  
  },  
  {  
    "name": "wait until the icon gone",  
  "method": "WaitIconGone",  
  "icon_path": "/root/... .../icon.png",  
  "match_options": {  
      "threshold_value": 90,  
  "as_gray": true,  
  "as_binary": false,  
  "img_shape_times": 1.0  
  },  
  "interval": 1,  
  "after_gone": "NextStep",  
  "time_out": 120,  
  "if_timeout": "End"  
  },  
  {  
    "name": "save data to a file with vim",  
  "method": "SaveWithVim",  
  "save_path": "/root/... .../icon.json"  
  },  
  {  
    "name": "terminal opera",  
  "method": "TermCommand",  
  "Command": "redis-cli -p xxxx rpush GrCookies 'diahwdioawafdoanwf;ona;owdaow'"  
  },  
  {  
    "name": "move mouse to a position and click",  
  "method": "Click",  
  "position": "TopLeft",  
  "pre_delay": null,  
  "sub_delay": 2  
  }  
]

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

flowoperate-0.0.1.tar.gz (19.6 kB view hashes)

Uploaded Source

Built Distribution

flowoperate-0.0.1-py3-none-any.whl (21.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page