Giter Site home page Giter Site logo

miegroups2022 / wechat-mass-msg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from frica01/wechat-mass-msg

0.0 0.0 0.0 108.19 MB

微信自动发送信息,微信群发消息,Windows系统微信客户端(PC端

License: GNU General Public License v3.0

Python 100.00%

wechat-mass-msg's Introduction

WeChat-mass-msg

微信群发消息,Windows系统客户端(PC端

主要技术

  • gui使用了pyside2
  • 操作WeChat的模块是 uiautomation

界面展示

值得注意的是:屏幕分辨率不一致,所展现的gui会有些许偏差,不想处理这个臭问题。

主页面


关于页面

安装依赖

pip install -r requirements.txt

关于打包

  • 当然,不打包直接执行 main.py,也是一样使用的。
pyinstaller -F -w --icon=gui/icon/icon.ico main.py

注意事项

不要做坏事,不要做坏事,不要做坏事!!!(不过看起来也做不了坏事

  • 需要先登录好Windows系统客户端的微信

  • 唤醒WeChat默认快捷键为Ctrl + Alt + W,这里我使用了自定义的快捷键Ctrl + Alt + Z, 可在 wechat_operation/wx_operation.py45行 处修改为你对应的快捷键。

使用示例

直接运行 main.py

操作WeChat的代码

  • wechat_operation/wx_operation.py

在发送消息 send_msg 函数中,无论是发送单条还是多条,都需要传入可迭代对象(eg:list(), tuple()...

可以同时发送文本文件,但不可同时都不发送!至少发送其中一种。

# 实例化WxOperation类
wx = WxOperation()

# 发送文本
wx.send_msg('好友名称', msgs=['hello', 'world'])

# 发送文件
wx.send_msg('好友名称', file_paths=['README.md', 'wx_operation.py'])

# 发送文本和文件
wx.send_msg('好友名称',  msgs=['hello', 'world'], file_paths=['README.md', 'wx_operation.py'])

# 批量发送
wx.send_msg(*['好友1','好友2'...], msgs=['hello', 'world'], file_paths=['README.md', 'wx_operation.py'])

# 获取微信好友
wx.get_friend_list()	# 获取全部好友
wx.get_friend_list(tag='你的标签')  # 获取指定标签好友

其他的自己去翻一翻代码吧,除去注释都不到100行代码。

免责声明

帮助我们处理群发消息的繁琐,解放双手(免责声明,本代码仅用于学习,下载后请勿用于商业用途)

wechat-mass-msg's People

Contributors

frica01 avatar

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.