Every day, at 9 p.m., I'm working on a Python program You have registered with the startup program in Windows 8.1.
However, if you shut down your computer before 9 o'clock, the program will not run.
To prevent this situation, if a computer user tries to shut down the computer without knowing it, It detects the shutdown status (click on the shutdown button) and informs you that there is an ongoing program I'd like to ask you if you want to shut down your computer.
I'm asking you a question because I don't know where to start.^
^ python interceptor
If a logoff or shutdown event occurs in the window, you can receive a callback. You can receive callbacks by window message.
https://docs.microsoft.com/ko-kr/windows/win32/shutdown/wm-endsession?redirectedfrom=MSDN
In other words, if the window is logged off or requested to end, a WM_ENDSESSION
message will be generated, so please process it when you receive the message.
Either you put a program that detects an end in the tray or you register it as a service (in this case, you cannot display a message).
I can ask you how to use Python.Although window programming is possible with Python because there is a win32 module, you need to have basic knowledge.
Parameters used by windows such as handles, message pumps, message handling, lparam, rparam...
It's quite possible to study, but it's not impossible, so try it.
561 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
558 Who developed the "avformat-59.dll" that comes with FFmpeg?
824 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
572 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.