← 返回
沟通协作 中文

WeChat Send

Automate sending text messages in the macOS WeChat desktop app by controlling the UI via AppleScript and JXA. This is NOT a WeChat chat channel for OpenClaw...
使用AppleScript和JXA自动化macOS微信桌面应用发送文本消息(非OpenClaw微信通道)。
clk1st
沟通协作 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 1,391
下载
💾 5
安装
1
版本
#automation#latest#macos#messaging#wechat

概述

WeChat Send

Send messages to WeChat contacts by automating the macOS WeChat desktop app.

Prerequisites

  • WeChat for Mac installed and logged in
  • macOS Accessibility permission granted to node (System Settings → Privacy & Security → Accessibility)
  • WeChat window must be open (not minimized to dock)

Usage

Run the script:

bash scripts/wechat_send.sh "<contact_name>" "<message>"

Examples

# Send a simple message
bash scripts/wechat_send.sh "Ryan" "你好!"

# Send a longer message
bash scripts/wechat_send.sh "Ellison" "明天下午3点开会,别忘了带文件"

How It Works

  1. Activates WeChat and opens search (Cmd+F)
  2. Types the contact name, selects the first result (Enter), closes search (Escape)
  3. Clicks the message input field using JXA CGEvent mouse simulation
  4. Pastes the message from clipboard (Cmd+V) and sends (Enter)

Limitations

  • Contact name must exactly match a WeChat contact (first search result is selected)
  • Cannot send images or files (text only)
  • Cannot read incoming messages
  • WeChat window position affects click coordinates (auto-calculated from window bounds)
  • If the contact search returns wrong results, the message goes to the wrong person — use specific names
  • Only one message at a time; for multiple recipients, call the script multiple times

Troubleshooting

  • Message not sent: Ensure WeChat window is visible (not minimized) and the correct contact was found
  • Accessibility error: Re-grant node permission in System Settings → Accessibility, then restart the gateway
  • Wrong contact: Use a more specific name to avoid ambiguous search results

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 07:51 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,707
communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 113 📥 52,367
communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,665