Code Monkey home page Code Monkey logo

pyofficerobot's Introduction

关于作者

这里是程序员晚枫,在重庆。

微信 公众号 交流群 B站 个人网站 线下活动
📱CoderWanFeng 川渝程序员 🌱技术&求职 程序员晚枫 python-office.com 技术交流会

开源项目 ✨

现阶段主要更新的几个开源项目,如下所示:

项目 介绍 GitHub地址 star 视频说明
python-office 自动化办公 https://github.com/CoderWanFeng/python-office github star gitee star B站视频
PyOfficeRobot 微信聊天机器人 https://github.com/CoderWanFeng/PyOfficeRobot github star gitee star B站视频
poocr 发票批量识别 https://github.com/CoderWanFeng/poocr github star gitee star B站视频
python-office.com 个人网站的源码 https://github.com/CoderWanFeng/python-office.com github star

VLOG🎦

福利资源 💴

pyofficerobot's People

Contributors

buzha avatar coderwanfeng avatar dumogu avatar heywfeng avatar zijian1619 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyofficerobot's Issues

关于使用此模块遇到的一些问题和疑问

  1. 正常个暗转运行发送消息例子,pc上的微信客户端正常打开,打开了“文件传输助手”,在发送消息的时候报错,超时异常,试了几次都是如此;
  2. 这个模块是否只支持在本地使用,无法在服务器上使用?
  3. 如果开发一个系统,支持在不同的群创建自动回复机器人,即,一个微信聊天群通过,添加“机器人”进群的方式提供自动回复功能。

Mac电脑用不了,M1的

Traceback (most recent call last):
File "", line 1, in
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "jiqiren.py", line 6, in
from PyOfficeRobot.core.WeChatType import *
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/venv/lib/python3.7/site-packages/PyOfficeRobot/init.py", line 1, in
from PyOfficeRobot.api import chat
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/venv/lib/python3.7/site-packages/PyOfficeRobot/api/chat.py", line 1, in
from PyOfficeRobot.core.WeChatType import WeChat
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/venv/lib/python3.7/site-packages/PyOfficeRobot/core/WeChatType.py", line 5, in
import uiautomation as uia
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/venv/lib/python3.7/site-packages/uiautomation/init.py", line 4, in
from .uiautomation import *
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/venv/lib/python3.7/site-packages/uiautomation/uiautomation.py", line 22, in
import ctypes.wintypes
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/wintypes.py", line 20, in
class VARIANT_BOOL(ctypes._SimpleCData):
ValueError: type 'v' not supported

在服务器部署定时发送,无法发送消息

image
运行时也不会报错,我认为是服务器在关闭远程连接后不会一直挂在那里,而是自动进入锁屏界面,但是我把远程连接一直挂载本地电脑的时候,只有当我的远程桌面在最顶置的时候才会触发发送消息的任务,当我把连接窗口最小化的时候无法发送消息,可能函数已经正常执行了,但是消息没有发出去,也没错先报错

希望可以增加@所有人功能

微信群管理员位置很少,希望在给机器人管理员之后,在群内 @机器人 所有人_今天放假
机器人会 @所有人 今天放假
他需要识别被@和被@的消息里所有人_之后的内容
然后使用管理员权限@所有人相应的内容

依照对方信息回复,python 一直busy,且无回复

代码:

keywords = {
"我要报名": "你好,这是报名链接:www.python-office.com",
"点赞了吗?": "点了",
"关注了吗?": "必须的",
"投币了吗?": "三连走起",
}
office.wechat.chat_by_keywords(who='astro', keywords=keywords)

系统信息如下:

在运行:office.wechat.chat_by_keywords , 这个方法的使用说明:https://www.bilibili.com/video/BV1fV4y1M7ju

==============================
【PyOfficeRobot,微信机器人全部功能】:https://www.python-office.com/office/robot.html

正在运行:office.chat.chat_by_keywords , 这个方法的使用说明:https://www.bilibili.com/video/BV1fV4y1M7ju

2023-04-21 21:35:22.736 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:35:22.749 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:35:22.763 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:35:22.765 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:35:22.778 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:35:22.786 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:35:22.800 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:36:05.601 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:36:05.611 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:36:05.622 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:36:05.633 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:36:05.644 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}
2023-04-21 21:36:05.654 WeChatType.py[48] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}

老哥想法很不错啊

看了下代码,代码实现有点类似于拿win32的句柄,win32开发已经很久没用过了,想问下老哥,既然能拿到句柄的话那能不能拿到event呢

wx.GetAllMessage 报错

friend_name, receive_msg = wx.GetAllMessage[-1][0], wx.GetAllMessage[-1][1]
这句语句调用后报错:
WeChatType.py[43] SplitMessage -> Find Control Timeout(0s): {ControlType: ButtonControl}

win10使用中的报错

运行错误代码详见:
item 2 in argtypes passes a union by value, which is unsupported.
Can not load UIAutomationCore.dll.
1, You may need to install Windows Update KB971513 if your OS is Windows XP, see https://github.com/yinkaisheng/WindowsUpdateKB971513ForIUIAutomation
2, you need to use an UIAutomationInitializerInThread object if use uiautomation in a thread, see demos/uiautomation_in_thread.py
Traceback (most recent call last):
File "D:\Program\Python3.7\lib\ctypes_init_.py", line 121, in WINFUNCTYPE
return _win_functype_cache[(restype, argtypes, flags)]
KeyError: (<class 'ctypes.HRESULT'>, (<class 'ctypes.c_long'>, <class 'comtypes.automation.tagVARIANT'>, <class 'comtypes.LP_POINTER(IUIAutomationCondition)'>), 0)

pip 安装后无法import

无论是使用pip install -i https://pypi.tuna.tsinghua.edu.cn/simple PyOfficeRobot -U,还是pip install PyOfficeRobot安装,安装过程都顺利,但是安装后都无法import,报错“ModuleNotFoundError: No module named 'PyOfficeRobot.core.group'”,出现问题的版本是0.16,之前安装的0.15版本没有出现这个问题。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.