docs: restructure markdown docs and publish the bridge

This commit is contained in:
xiaoan
2026-11-14 22:50:21 +08:00
commit 38dccd9a9f
45 changed files with 4353 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"""List all windows (visible or not) belonging to Weixin processes."""
import win32gui, win32process, psutil, json, sys
target_pids = {}
for p in psutil.process_iter(['pid', 'name']):
try:
if p.info['name'] and p.info['name'].lower() in ('weixin.exe', 'wechat.exe'):
target_pids[p.info['pid']] = p.info['name']
except Exception:
pass
rows = []
def cb(hwnd, _):
_, pid = win32process.GetWindowThreadProcessId(hwnd)
if pid in target_pids:
rows.append(dict(hwnd=hwnd, pid=pid, cls=win32gui.GetClassName(hwnd),
title=win32gui.GetWindowText(hwnd),
visible=bool(win32gui.IsWindowVisible(hwnd)),
iconic=bool(win32gui.IsIconic(hwnd)),
rect=win32gui.GetWindowRect(hwnd)))
return True
win32gui.EnumWindows(cb, None)
print("pids:", target_pids)
for r in rows:
print(json.dumps(r, ensure_ascii=False))