首页 > 其他分享 >利用pyautogui调用微信ocr

利用pyautogui调用微信ocr

时间:2024-01-30 18:12:47浏览次数:25  
标签:pyautogui moveTo 微信 sleep time hotkey ocr click

import pyautogui
import time

def ocrweixin(filename):
    # 鼠标点击,默认左键
    #移至sheet页
    pyautogui.click(1386,33) 
    #点击 地址框
    pyautogui.click(1364,94) 
    pyautogui.hotkey('ctrl','a')
    time.sleep(0.5)

    pyautogui.typewrite('file:///C:/Users/mydell/Desktop/zhuanxie/pic/'+str(filename)+'.png')
    # time.sleep(2)
    pyautogui.press('enter')
    time.sleep(2)

    pyautogui.click(784,638) 
    #启动微信ocr
    pyautogui.hotkey('alt', 'a')
    time.sleep(2)
    pyautogui.moveTo(668,132)


    # 鼠标选取范围
    pyautogui.mouseDown()   
    pyautogui.moveTo(1248,1073)
    # 鼠标释放
    pyautogui.mouseUp() 
    pyautogui.click(838,88) 

    time.sleep(1)
    pyautogui.click(1705, 551)
    pyautogui.hotkey('ctrl','a')
    pyautogui.hotkey('ctrl','c')

    # 获取剪贴板的内容
    clipboard_content = pyperclip.paste()
#     pyautogui.moveTo(1852,204)
    pyautogui.click(1852,204)
    return clipboard_content

标签:pyautogui,moveTo,微信,sleep,time,hotkey,ocr,click
From: https://www.cnblogs.com/duoba/p/17997693

相关文章

  • 在企业微信中如何获取unionId?
    1.概念科普微信开放和公众平台的定位微信开放平台是为了让第三方应用投入微信的怀抱而设计的,比如第三方的移动应用(Android/IOS)、网站等;微信为了开疆拓土,扩大自己的影响力。微信公众平台是为了让程序员利用微信生态技术开发公众号、小程序而建立的,是一个技术提供平台;这才是......
  • 微信小程序: 传递对象数据
    一、传递参数的页面wxml<viewclass="right"><viewclass="status"style="color:{{item.color}}">{{item.status}}</view>......
  • 微信小程序:滚动tab栏
    1、wxml<view><scroll-viewscroll-x="true"class="tab-h"scroll-left="{{scrollLeft}}"><viewwx:for="{{tabs}}"wx:for-index="index"wx:key="id"class="tab-item{{c......
  • Python调用微信OCR识别文字和坐标
    python的ocr识别最方便的最准确的方法就是直接调微信的ocr注意:调用的时候先把微信关掉。importosimportjsonimporttimefromwechat_ocr.ocr_managerimportOcrManager,OCR_MAX_TASK_IDwechat_ocr_dir=r"C:\Users\mydell\AppData\Roaming\Tencent\WeChat\XPlugin\P......
  • 批量检测微信小程序是否封禁
    `<?php//要检测的appid列表$appids=array('appid1','appid2','appid3');//使用实际的appid//循环调用接口检测小程序状态foreach($appidsas$appid){//构造接口URL,将appid作为参数传递$url='https://yan.changxunwangluo.cn/xcx/check_mini_pro......
  • 微信小程序排行榜
     好看的排行榜界面wxml<!--ranklist.wxml--><view class="container">  <scroll-view class="list" scroll-y bindscrolltolower="{{hasReachBottom}}">    <view wx:for="{{key}}" wx:key="item" wx:f......
  • 微信开发者工具快捷键汇总
     打开快捷键面板F1打开/关闭工具栏Ctrl+Shift+T打开/关闭模拟器Ctrl+Shift+D打开/关闭调试器Ctrl+Shift+M格式化文件Shift+Alt+F编译Ctrl+B刷新Ctrl+R删除行Ctrl+Shift+K向上复制行Shift+Alt+↑向上移动行Alt+↑向下复制行Shift+Alt+↓向下移动行Alt+↓更改所有匹......
  • scss 走马灯效果(兼容微信小程序)
    <template><viewclass="marquee"><viewclass="marquee-inner"><spanv-for="(item,index)oftextList":key="index">{{item.text}}</span><!--复制一份内容-->......
  • css 转盘抽奖(兼容微信小程序)
    <template><divclass="turntable"v-wechat-title="$route.meta.title"><!--转盘包裹--><divclass="rotate"><!--转盘图片--><imageclass="dish"src="../../stati......
  • 微信小程序:弹框
    一、自定义弹框组件1、组件定义在components目录下创建dialog文件夹,然后选择文件夹,右键,点击"新建Component",就会创建四个文件。如下所示:wxml<!--components/dialog/index.wxml--><viewwx:if="{{isShow}}"class="tip-area"><viewbindtap="hideClick"c......