Install
openclaw skills install wechat-sender-pyautoguiUse PyAutoGUI to automate sending messages or files via WeChat by simulating keyboard inputs with customizable contact selection and send options.
openclaw skills install wechat-sender-pyautogui快捷键版微信发送工具,使用 PyAutoGUI 模拟键盘操作。
# 发送消息
python D:\clawSpaces\skills\wechat-sender\wechat_sender.py --contact "联系人" --message "消息内容"
# 发送文件
python D:\clawSpaces\skills\wechat-sender\wechat_sender.py --contact "联系人" --file "文件路径"
# 仅输入不发送(让用户自己确认)
python D:\clawSpaces\skills\wechat-sender\wechat_sender.py --contact "联系人" --message "消息" --no-send
# 选择第 N 个同名联系人
python D:\clawSpaces\skills\wechat-sender\wechat_sender.py --contact "联系人" --message "消息" --index 2
# 临时指定快捷键(本次有效)
python D:\clawSpaces\skills\wechat-sender\wechat_sender.py -c "张三" -m "你好" --hotkey "Ctrl+Shift+W"
# 保存快捷键配置(永久有效)
python D:\clawSpaces\skills\wechat-sender\wechat_sender.py --config-hotkey "Ctrl+Alt+W"
# 查看当前快捷键配置
python D:\clawSpaces\skills\wechat-sender\wechat_sender.py --show-config
| 参数 | 说明 |
|---|---|
--contact, -c | 联系人名称(必填) |
--message, -m | 消息内容 |
--file, -f | 文件路径 |
--no-send | 仅输入不发送,让用户自己确认 |
--index, -i | 选择第 N 个联系人(默认 1) |
--hotkey, -k | 临时指定微信打开快捷键(格式:Ctrl+Alt+W) |
--config-hotkey | 保存微信快捷键到配置文件 |
--show-config | 显示当前快捷键配置 |
Ctrl+Alt+W - 打开微信(默认)方法 1:临时指定(本次有效)
python wechat_sender.py -c "张三" -m "你好" --hotkey "Ctrl+Shift+W"
方法 2:保存到配置文件(永久有效)
# 保存快捷键
python wechat_sender.py --config-hotkey "Ctrl+Shift+W"
# 查看配置
python wechat_sender.py --show-config
配置文件位置:wechat-sender/wechat_config.json
Ctrl+Alt+WCtrl+Shift+WAlt+F4Ctrl+WCtrl+F - 搜索联系人(固定)Enter - 确认选择/发送消息(固定)pip install pyautogui
pyautogui.FAILSAFE = True - 鼠标移到屏幕角落可中止操作pyautogui.PAUSE = 0.3 - 每次操作间隔 0.3 秒--config-hotkey 配置--no-send 预览python wechat_sender.py -c "张三" -m "早上好!"
# 第一次:配置快捷键
python wechat_sender.py --config-hotkey "Ctrl+Shift+W"
# 以后:直接使用
python wechat_sender.py -c "李四" -m "下午好!"
# 某次临时使用不同的快捷键
python wechat_sender.py -c "王五" -m "你好" --hotkey "Alt+Shift+W"