Convert Figma logo to code with AI

TKkk-iOSer logoWeChatPlugin-MacOS

微信小助手

14,060
2,497
14,060
150

Top Related Projects

A dynamic library tweak for WeChat macOS - 首款微信 macOS 客户端撤回拦截与多开 🔨

Mac微信功能拓展/微信插件/微信小助手(A plugin for Mac WeChat)

微信小助手的安装 / 更新工具。

网页版微信API,包含终端版微信及微信机器人

Quick Overview

WeChatPlugin-MacOS is a plugin for the macOS version of WeChat, a popular Chinese messaging app. It enhances the functionality of WeChat by adding features such as message recall prevention, auto-reply, and remote control. The plugin aims to improve the user experience and provide additional tools for WeChat users on macOS.

Pros

  • Adds useful features not available in the official WeChat client
  • Enhances privacy by preventing message recall
  • Provides automation capabilities through auto-reply and remote control
  • Open-source, allowing for community contributions and customization

Cons

  • May violate WeChat's terms of service
  • Could potentially compromise user security if not properly vetted
  • Requires manual installation and updates
  • May break with WeChat updates, requiring frequent maintenance

Code Examples

// Example of preventing message recall
- (void)onRevokeMsg:(id)msg {
    if ([self.msgManager getMsgData:msg].msgStatus == 4) {
        [self.msgManager updateMsgStatus:msg status:0];
    }
}
// Example of setting up auto-reply
- (void)autoReplyWithMsg:(id)msg {
    if ([self.autoReplyModel.enable boolValue]) {
        NSString *content = [self.chatManager getChatContentWithData:msg];
        if ([content isEqualToString:self.autoReplyModel.keyword]) {
            [self.chatManager sendTextMessage:self.autoReplyModel.replyContent toUsrName:[self.chatManager getChatUsrNameWithData:msg]];
        }
    }
}
// Example of remote control setup
- (void)remoteControlWithMsg:(id)msg {
    if ([self.remoteControlModel.enable boolValue]) {
        NSString *content = [self.chatManager getChatContentWithData:msg];
        if ([content hasPrefix:@"#remote"]) {
            [self executeRemoteCommand:[content substringFromIndex:7]];
        }
    }
}

Getting Started

  1. Download the latest release from the GitHub repository.
  2. Unzip the downloaded file.
  3. Open Terminal and navigate to the unzipped folder.
  4. Run the installation script:
sudo ./install.sh
  1. Restart WeChat.
  2. The plugin should now be active. Access the plugin settings through the WeChat menu bar.

Competitor Comparisons

A dynamic library tweak for WeChat macOS - 首款微信 macOS 客户端撤回拦截与多开 🔨

Pros of WeChatTweak-macOS

  • More actively maintained with recent updates
  • Cleaner and more organized codebase
  • Better documentation and installation instructions

Cons of WeChatTweak-macOS

  • Fewer features compared to WeChatPlugin-MacOS
  • Less customization options for users
  • Smaller community and fewer contributors

Code Comparison

WeChatTweak-macOS:

- (void)hook_sendLogoutCGIWithCompletion:(id)completion {
    [self hook_sendLogoutCGIWithCompletion:completion];
    [NSNotificationCenter.defaultCenter postNotificationName:WeChatTweakLogoutNotification object:nil];
}

WeChatPlugin-MacOS:

- (void)hook_onLogOut {
    [[TKWeChatPluginConfig sharedConfig] setIsAutoAuthEnable:NO];
    [[TKWeChatPluginConfig sharedConfig] setIsOnTop:NO];
    [self hook_onLogOut];
}

The code comparison shows that both projects use method swizzling to hook into WeChat's logout functionality. However, WeChatTweak-macOS uses a notification system for logout events, while WeChatPlugin-MacOS focuses on disabling certain plugin features during logout.

Mac微信功能拓展/微信插件/微信小助手(A plugin for Mac WeChat)

Pros of WeChatExtension-ForMac

  • More active development and frequent updates
  • Broader feature set, including custom themes and multi-account support
  • Larger community and more contributors

Cons of WeChatExtension-ForMac

  • Potentially less stable due to rapid development
  • May have a steeper learning curve for new users
  • Some features might be considered unnecessary by minimalist users

Code Comparison

WeChatExtension-ForMac:

- (void)hook_didLoadWithCompletion:(void (^)(void))completion {
    [self hook_didLoadWithCompletion:^{
        if (completion) {
            completion();
        }
        [[YMWeChatPluginConfig sharedConfig] initializeSettings];
    }];
}

WeChatPlugin-MacOS:

- (void)hook_didLoadWithCompletion:(void (^)(void))completion {
    [self hook_didLoadWithCompletion:^{
        if (completion) {
            completion();
        }
        [[TKWeChatPluginConfig sharedConfig] setup];
    }];
}

Both projects use method swizzling to inject custom functionality, but WeChatExtension-ForMac uses a more descriptive method name for initializing settings.

微信小助手的安装 / 更新工具。

Pros of oh-my-wechat

  • Easier installation process with a simple command-line interface
  • Regular updates and active maintenance
  • Supports automatic updates for both the plugin and WeChat

Cons of oh-my-wechat

  • Fewer features compared to WeChatPlugin-MacOS
  • Less customization options for users
  • May have compatibility issues with some WeChat versions

Code Comparison

WeChatPlugin-MacOS:

- (void)hook_startMainThread
{
    BOOL isWeChatLaunched = [[NSWorkspace sharedWorkspace] launchedApplications].firstObject;
    if (!isWeChatLaunched) {
        [self initializePlugin];
    }
    [self hook_startMainThread];
}

oh-my-wechat:

async function installPlugin() {
  try {
    await downloadPlugin()
    await backupWeChat()
    await injectionPlugin()
    console.log('Plugin installation completed')
  } catch (err) {
    console.error('Plugin installation failed:', err)
  }
}

The code snippets show different approaches:

  • WeChatPlugin-MacOS uses Objective-C and hooks into WeChat's main thread
  • oh-my-wechat uses JavaScript and focuses on plugin installation and injection

Both projects aim to enhance WeChat on macOS, but WeChatPlugin-MacOS offers more extensive modifications, while oh-my-wechat prioritizes ease of use and maintenance.

网页版微信API,包含终端版微信及微信机器人

Pros of WeixinBot

  • Platform-independent: Works on various operating systems, not limited to macOS
  • Focuses on bot functionality: Provides a framework for creating WeChat bots
  • More lightweight: Doesn't require modifying the WeChat application

Cons of WeixinBot

  • Less feature-rich: Lacks some advanced features present in WeChatPlugin-MacOS
  • Potentially less stable: May be affected by WeChat API changes more easily
  • Limited GUI integration: Primarily operates through command-line interface

Code Comparison

WeixinBot (Python):

def send_msg(self, toUserName, content):
    url = self.base_uri + '/webwxsendmsg?pass_ticket=%s' % self.pass_ticket
    msg_id = str(int(time.time() * 1000)) + str(random.random())[:5].replace('.', '')
    params = {
        'BaseRequest': self.BaseRequest,
        'Msg': {
            'Type': 1,
            'Content': content,
            'FromUserName': self.User['UserName'],
            'ToUserName': toUserName,
            'LocalID': msg_id,
            'ClientMsgId': msg_id
        }
    }
    headers = {'content-type': 'application/json; charset=UTF-8'}
    data = json.dumps(params, ensure_ascii=False).encode('utf8')
    try:
        r = self.session.post(url, data=data, headers=headers)
    except:
        return False
    dic = r.json()
    return dic['BaseResponse']['Ret'] == 0

WeChatPlugin-MacOS (Objective-C):

- (void)sendTextMessage:(NSString *)text toUsrName:(NSString *)userName
{
    WCContactData *contact = [self.contactsManager getContact:userName];
    if (contact) {
        [self addLocalMessageWithText:text toContact:contact];
        MMChatMessageViewController *chatMessageVC = [self getChatMessageViewControllerWithContact:contact];
        [chatMessageVC sendTextMessage:text];
    }
}

The code snippets show different approaches to sending messages, with WeixinBot using HTTP requests and WeChatPlugin-MacOS leveraging the WeChat application's internal methods.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

微信小助手.png

platform release support Readme GitHub license

微信小助手 v2.0

English | 中文

[ 功能更新日志Demo演示使用安装卸载TODO ]

其他插件: [ wechat-alfred-workflowQQ 版本 ]


功能

  • 消息自动回复
  • 消息防撤回
  • 远程控制(已支持语音)
  • 微信多开
  • 第二次登录免认证
  • 聊天置底功能(类似置顶)
  • 微信窗口置顶
  • 会话多选删除
  • 自动登录开关
  • 通知中心快捷回复
  • 聊天窗口表情包复制 & 存储
  • 小助手检测更新提醒
  • alfred 快捷发送消息 & 打开窗口 (需安装:wechat-alfred-workflow)
  • 会话一键已读
  • 一键清除空会话
  • 支持国际化
  • 新增一键更新
  • 新增关于小助手
  • 去除微信url转链(从此直接打开抖音链接🌝
  • 史上最强 alfred 扩展🌚
  • 新增移除会话(不删除聊天记录)
  • 菜单栏(关于小助手)新增 alfred 开关
  • 新增是否使用微信自带浏览器开关
  • 新增LaunchBar 扩展
  • 新增禁止微信检测更新开关(非App Store版本)
  • 新增小助手.app安装方式
  • 支持退群监控,撤回消息定位
  • 支持微信 3.7.0

若无使用 alfred,则不必打开 alfred 开关

远程控制:

  • 屏幕保护
  • 清空废纸篓
  • 锁屏、休眠、关机、重启
  • 退出QQ、WeChat、Chrome、Safari、所有程序
  • 网易云音乐(播放、暂停、下一首、上一首、喜欢、取消喜欢)
  • 小助手(获取指令、防撤回开关、自动回复开关、免认证登录开关)

若想使用远程控制网易云音乐,请在“系统偏好设置 ==> 安全性与隐私 ==> 隐私 ==> 辅助功能”中添加微信、脚本编辑器


更新日志

详细内容请查看CHANGELOG


Demo演示

  • 消息防撤回 消息防撤回.gif

  • 自动回复 自动回复.gif

  • 微信多开 微信多开.gif

  • 远程控制 (测试关闭Chrome、QQ、开启屏幕保护) 远程控制.gif

  • 免认证 & 置底 & 多选删除 免认证&置底&多选删除

  • 通知中心快捷回复 快捷回复

  • 聊天窗口表情复制 & 存储

  • 语音远程控制 mac 语音远程控制

  • Alfred 快速搜索 wechat-alfred-workflow
    alfred

  • Alfred 搜索最近聊天列表 & 查看聊天记录
    alfred

  • 一键已读 & 一键清除空回话 基本操作


使用

  • 消息防撤回:点击开启消息防撤回或者快捷键command + t,即可开启、关闭。
  • 自动回复:点击开启自动回复或者快捷键conmand + k,将弹出自动回复设置的窗口,点击红色箭头的按钮设置开关。

若关键字为 *,则任何信息都回复; 若关键字为x|y,则 x 和 y 都回复; 若关键字或者自动回复为空,则不开启该条自动回复; 可设置延迟回复,单位:秒; 若开启正则,请确认正则表达式书写正确,在线正则表达式测试 若开启特定联系人回复,则原先的群聊&私聊回复无效

自动回复设置.png

  • 微信多开:点击登录新微信或者快捷键command + shift + n,即可多开微信。

  • 远程控制:点击远程控制 Mac OS或者快捷键command + shift + c,即可打开控制窗口。

注意:仅向自己账号发送指令有效

远程控制设置.png


安装

详细安装方法(或者需要重新编译)请查阅 Install.md

1. 安装

若提示无权限:Permission denied,执行 sudo chmod -R 777 /Applications/WeChat.app

1.1 需要安装Git

打开应用程序-实用工具-Terminal(终端),执行下面的命令安装

cd ~/Downloads && rm -rf WeChatPlugin-MacOS && git clone https://github.com/TKkk-iOSer/WeChatPlugin-MacOS.git --depth=1 && ./WeChatPlugin-MacOS/Other/Install.sh

2. 普通安装

  • 点击clone or download按钮下载 WeChatPlugin 并解压,打开Terminal(终端),拖动解压后Install.sh 文件(在 Other 文件夹中)到 Terminal 回车即可。

3. 安装完成

  • 重启微信,在菜单栏中看到微信小助手即安装成功。

微信小助手.png


卸载

打开Terminal(终端),拖动解压后Uninstall.sh 文件(在 Other 文件夹中)到 Terminal 回车即可。


TODO

  • 增加Alfred搜索
  • 查看单向好友
  • 增加 brew 安装方式
  • 完善自动回复(指定好友回复)
  • 完善消息防撤回(显示撤回用户昵称)
  • 清除微信缓存(官方已加)
  • 优化小助手设置(更新后保留相关设置,更新提醒)
  • 语音远程控制 mac
  • 支持中英文
  • 支持深色模式

依赖


免责声明

  • 使用插件有风险,使用需谨慎。
  • 本项目旨在提升生活幸福感使用,不可用于商业和个人其他意图。若使用不当,请使用者自行承担。
  • 如有侵权,请联系本人。tkk.ioser@gmail.com