Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 32 位 AutoHotkey 在微信中无法获取坐标 #4

Closed
amorphobia opened this issue Aug 30, 2024 · 2 comments
Closed

使用 32 位 AutoHotkey 在微信中无法获取坐标 #4

amorphobia opened this issue Aug 30, 2024 · 2 comments

Comments

@amorphobia
Copy link

amorphobia commented Aug 30, 2024

用 visual studio x86 工具链编译 GetCaretPosFromHook.obj

cl /O2 /Ob1 /c /GS- /std:c++20 /d1reportSingleClassLayoutCaretPosHookData GetCaretPosFromHook.cpp
用于 x86 的 Microsoft (R) C/C++ 优化编译器 19.41.34120 版
版权所有(C) Microsoft Corporation。保留所有权利。

GetCaretPosFromHook.cpp

class CaretPosHookData  size(196):
        +---
 0      | user32Base
 4      | combaseBase
 8      | hwnd
12      | tid
16      | msg
20      | exitCode
24      | CaretPosHookEditSession caretPosEditSession
48      | CaretPosHookEditSessionVTable caretPosEditSessionVTable
64      | _GUID CLSID_TF_ThreadMgr
80      | _GUID IID_ITfThreadMgr
96      | sSetWindowsHookExW
116     | sUnhookWindowsHookEx
136     | sCallNextHookEx
156     | sSendMessageTimeoutW
176     | sCoCreateInstance
        +---

AHK 代码

#Requires AutoHotkey v2.0 32-bit
#Include "GetCaretPosEx.ahk"

f1:: {
    if GetCaretPosEx(&left, &top, &right, &bottom, true) {
        A_CoordModeToolTip := "Screen"
        ToolTip(Format("l {} t {} r {} b {}", left, top, right, bottom), left, bottom)
    }
}

在微信中无法获取坐标

@Tebayaki
Copy link
Owner

微信在某次更新后无法通过ui自动化接口获取光标了,只能通过内存注入获取,而32位进程是不能注入64位进程的,所以没办法解决。

@amorphobia
Copy link
Author

明白了,感谢回复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants