#๐Ÿ”’ Return evtvwr event text through win32evtlog

5 messages ยท Page 1 of 1 (latest)

cerulean salmon
#

So I am creating a program to debug my screen going black randomly by creating a key bind to then save all the event viewer events from the past few seconds to find a pattern in what events led up to it going black. Through this I want to access the actual human readable message that event viewer shows when clicking on a event. I am using CoPilot to find suitable libraries, classes and functions etc but now I'm stuck.

https://paste.pythondiscord.com/UFFA

Line 24 is what is causing the issue, the except statement says that EvtFormatMessage wants to have a third argument that is a flag and that it should be a int, but I can't find its definition so I only have CoPilot to rely on which has given me the exact same solution 3 times in a row (just with more print statements added each time). So how should I access the actual event message through py?

scarlet sunBOT
#

@cerulean salmon

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

light kiln
scarlet sunBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.