Install
openclaw skills install wechat-moment微信朋友圈操作技能。用于打开朋友圈、浏览动态、滚动查看内容等。使用场景:(1) 打开朋友圈,(2) 滚动浏览朋友圈内容,(3) 查看好友动态,(4) 给朋友圈点赞评论
openclaw skills install wechat-moment禁止使用 Start-Process 启动微信!必须通过点击任务栏图标打开!
正确流程:
❌ 错误方式:Start-Process "D:\Weixin\Weixin.exe"(这只启动进程,不会打开界面)
| 功能 | 坐标 (X, Y) | 说明 |
|---|---|---|
| 显示隐藏图标 | 1142, 744 | 任务栏显示隐藏图标按钮 |
| 微信图标 | 1111, 701 | 微信启动图标 |
| 激活微信 | 400, 300 | 点击屏幕中间激活微信窗口 |
| 朋友圈按钮 | 272, 322 | 朋友圈标签位置 |
| 语音电话 | 1055, 108 | 聊天窗口右上角电话按钮 |
重要:若微信未显示在任务栏,需先点击显示隐藏图标!
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class WMoments {
[DllImport("user32.dll")] public static extern bool SetCursorPos(int X, int Y);
[DllImport("user32.dll")] public static extern void mouse_event(int flags, int dx, int dy, int d, int e);
}
"@
# 1. 点击显示隐藏图标 (1142, 744)
[WMoments]::SetCursorPos(1142, 744)
Start-Sleep -Milliseconds 100
[WMoments]::mouse_event(2, 0, 0, 0, 0)
[WMoments]::mouse_event(4, 0, 0, 0, 0)
Start-Sleep -Milliseconds 300
# 2. 点击微信图标 (1111, 701)
[WMoments]::SetCursorPos(1111, 701)
Start-Sleep -Milliseconds 100
[WMoments]::mouse_event(2, 0, 0, 0, 0)
[WMoments]::mouse_event(4, 0, 0, 0, 0)
Start-Sleep -Milliseconds 500
# 3. 激活微信(点击屏幕中间)
[WMoments]::SetCursorPos(400, 300)
Start-Sleep -Milliseconds 100
[WMoments]::mouse_event(2, 0, 0, 0, 0)
[WMoments]::mouse_event(4, 0, 0, 0, 0)
Start-Sleep -Milliseconds 200
# 4. 点击朋友圈按钮
[WMoments]::SetCursorPos(272, 322)
Start-Sleep -Milliseconds 100
[WMoments]::mouse_event(2, 0, 0, 0, 0)
[WMoments]::mouse_event(4, 0, 0, 0, 0)
### 关闭朋友圈
点击右上角关闭按钮 (932, 108)
```powershell
# 点击右上角关闭朋友圈
[WMoments]::SetCursorPos(932, 108)
Start-Sleep -Milliseconds 100
[WMoments]::mouse_event(2, 0, 0, 0, 0)
[WMoments]::mouse_event(4, 0, 0, 0, 0)
正确的浏览方式:先向下滚动浏览,再慢慢往上滚回顶部
# 1. 先向下滚动100次浏览内容
for ($i = 0; $i -lt 100; $i++) {
[WMoments]::SetCursorPos(600, 400)
[WMoments]::mouse_event(0x0800, 0, 0, -50, 0)
Start-Sleep -Milliseconds 200
}
# 2. 再慢慢往上滚动300次回到顶部(是向下滚动的3倍)
for ($i = 0; $i -lt 300; $i++) {
[WMoments]::SetCursorPos(600, 400)
[WMoments]::mouse_event(0x0800, 0, 0, 50, 0)
Start-Sleep -Milliseconds 150
}
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SendKeys]::SendWait("^f")
Start-Sleep -Milliseconds 300
[System.Windows.Forms.SendKeys]::SendWait("联系人名字")
Start-Sleep -Milliseconds 300
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SendKeys]::SendWait("你好,我是贾维斯")
Start-Sleep -Milliseconds 100
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
# 点击语音电话按钮 (1055, 108)
[WMoments]::SetCursorPos(1055, 108)
Start-Sleep -Milliseconds 50
[WMoments]::mouse_event(2, 0, 0, 0, 0)
[WMoments]::mouse_event(4, 0, 0, 0, 0)
# 选择语音通话
Start-Sleep -Milliseconds 200
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SendKeys]::SendWait("{DOWN}")
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")