如何读取/截获发送到Windows调试器的消息?

2024-10-02 22:35:36 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试为我的Logitech脚本实现更多的功能,但我认为在Logitechs LUA接口中不可能实现。我考虑使用C++ + Python,但我不知道如何在Lua脚本中或任何数据中获取数据。我看到的唯一的可能性是通过“OutuDebug消息()”函数,但是我找不到关于如何在C++/Python代码中读取/拦截它的详细信息。这是可能的,还是我应该开始学习如何读取其他程序的记忆?你知道吗

以下是罗技LUA参考PDF:https://drive.google.com/file/d/1kBK3EbWiYrhPt9MMXBBEeZECFDXaLAJD/view?usp=sharing

以下是相关的“OutputDebugMessage()”函数参考:

-- OutputDebugMessage() will send log messages to the Windows debugger.
-- OutputDebugMessage("Message");
-- Parameters
--     Message
--         Printf style, formatted string containing the message.
-- Return Values
--     nil
-- Remarks
--     Mirror of string.format().
--     You must manually insert a carriage return "\n" to denote end of line.
--     Use tools like Dbg View for viewing these messages.

-- Example
-- Send out "Hello World"
OutputDebugMessage("Hello World\n")

Tags: oftheto函数功能脚本messagehello