macos-wechat-send

# wechat-send - 微信自动发送技能

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "macos-wechat-send" with this command: npx skills add sincerememe/macos-wechat-send

wechat-send - 微信自动发送技能

版本: v1.0.1

描述

通过 AppleScript 控制微信 Mac 版自动发送消息。使用剪贴板复制粘贴方式,避免输入法影响。

v1.0.1 新增: 智能垫脚石技术 — 连续给同一联系人发消息时自动使用"文件传输助手"垫脚石,确保输入框聚焦;切换联系人时跳过垫脚石步骤,提升发送效率。

触发场景:

  • 用户要求发送微信消息
  • 需要自动化微信操作
  • macOS 系统 + 微信 Mac 版环境

环境检查

  1. 系统检查 - 必须是 macOS
  2. 微信检查 - 微信必须已打开并登录
  3. 权限检查 - 需要辅助功能权限
# 检查微信是否运行
osascript -e 'tell application "System Events" to get name of every process' | grep -i wechat

使用方法

直接调用脚本

wechat-send.sh "联系人名字" "消息内容"

参数说明

参数说明
联系人名字微信中的联系人名字,必须完全匹配
消息内容要发送的消息文本(支持特殊字符)

操作流程

智能垫脚石逻辑(v1.0.1+)

  • 同一联系人连续发送 → 使用"文件传输助手"垫脚石,确保输入框聚焦
  • 切换联系人发送 → 跳过垫脚石,直接搜索目标联系人,提升效率

详细步骤

  1. 四重激活微信窗口

    • open -a WeChat
    • tell application "WeChat" to activate
    • set frontmost of process "WeChat" to true
    • perform action "AXRaise" of window 1
  2. 检查联系人状态(v1.0.1+)

    • 读取 .last_contact 状态文件
    • 比较当前联系人与上一次是否相同
    • 决定是否使用垫脚石
  3. 搜索文件传输助手(仅同一联系人时)

    • 按 ESC 清除残留状态
    • Cmd+F 搜索
    • 粘贴"文件传输助手"
    • 回车打开
  4. 搜索目标联系人

    • 按 ESC 清除状态
    • Cmd+A 清空搜索框
    • Cmd+F 搜索
    • 粘贴联系人名字
    • 回车打开(输入框自动聚焦)
  5. 发送消息

    • 粘贴消息内容
    • 回车发送
    • 保存当前联系人为 .last_contact

脚本文件

  • wechat-send.py - 主脚本(含智能垫脚石逻辑)
  • wechat-send.sh - 快捷脚本
  • .last_contact - 状态文件(记录上一次发送的联系人)

依赖

  • Python 3
  • pyautogui
  • macOS AppleScript

常见问题

1. 辅助功能权限

如果提示权限不足:

系统设置 → 隐私与安全性 → 辅助功能

勾选"终端"或你使用的终端应用。

2. 联系人找不到

  • 检查名字是否完全匹配
  • 确认联系人确实存在
  • 尝试使用备注名

3. 消息发送失败

  • 确认微信已登录
  • 确认网络正常
  • 检查是否有多个同名联系人

更新日志

v1.0.1 (2026-03-16)

  • ✨ 新增智能垫脚石技术
  • 📁 添加 .last_contact 状态文件记录
  • ⚡ 优化:连续同一联系人时使用垫脚石,切换联系人时跳过垫脚石
  • 📝 添加发送状态提示输出

v1.0.0

  • 初始版本发布
  • 支持文本消息自动发送
  • 四重窗口激活机制
  • 文件传输助手垫脚石技术
  • 剪贴板特殊字符处理

扩展建议

未来可以扩展:

  • 发送图片/文件
  • 群聊支持
  • 聊天记录读取
  • 更多联系人匹配方式

⚠️ 免责声明

本工具仅供学习和个人使用。使用者应遵守:

  1. 微信服务条款
  2. 当地法律法规
  3. 道德规范

请勿用于骚扰、诈骗或其他非法活动。

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Seerr server manager

CLI for the Seerr media request management API. Search movies and TV shows, create and manage media requests, manage users, track issues, and administer a se...

Registry SourceRecently Updated
Coding

Vultr

Manage Vultr cloud infrastructure including VPS instances, bare metal, Kubernetes clusters, databases, DNS, firewalls, VPCs, object storage, and more. Use wh...

Registry SourceRecently Updated
Coding

Md Web

Publish markdown files as shareable web pages and return a clickable link.

Registry SourceRecently Updated
Coding

python-image

Local image processing toolkit for format conversion, compression, resizing, batch jobs, and image-to-PDF. Use when users ask 压缩图片/改尺寸/批量处理/转PDF. Supports si...

Registry SourceRecently Updated
1211Profile unavailable