We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Any other way to do it? win32api?
The text was updated successfully, but these errors were encountered:
you can try this one ~
from ctypes import * HWND_BROADCAST = 0xffff WM_SYSCOMMAND = 0x0112 SC_MONITORPOWER = 0xF170 MonitorPowerOff = 2 SW_SHOW = 5 windll.user32.PostMessageW(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, MonitorPowerOff) shell32 = windll.LoadLibrary("shell32.dll") shell32.ShellExecuteW(None, 'open', 'rundll32.exe', 'USER32', '', SW_SHOW)
Sorry, something went wrong.
pip install pywin32
worked for me on Windows 10, with python 3.10.
No branches or pull requests
Any other way to do it?
win32api?
The text was updated successfully, but these errors were encountered: