Evil_Has_Survived Posted March 29, 2006 Share Posted March 29, 2006 I was wondering if there is a command for the monitor instead of manually shutting off and on. you guys maybe wondering why I would need this command, it's because im making a program that controls everything, and plus I broke my monitor reasonly and I have to use a pen to turn it on and off lol, but im getting a new monitor soon Thanks in advance Link to comment Share on other sites More sharing options...
seandisanti Posted March 29, 2006 Share Posted March 29, 2006 I was wondering if there is a command for the monitor instead of manually shutting off and on. you guys maybe wondering why I would need this command, it's because im making a program that controls everything, and plus I broke my monitor reasonly and I have to use a pen to turn it on and off lol, but im getting a new monitor soon#include <Misc.au3> Const $WM_SYSCommand = 274, $SC_MonitorPower = 61808, $Power_On = -1, $Power_Off = 2 $dll = DllOpen("user32.dll") $HWND = WinGetHandle(WinGetTitle("", "")) DllCall($dll, "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_Off) Link to comment Share on other sites More sharing options...
tradertt Posted April 3, 2006 Share Posted April 3, 2006 When I move a mouse or click a button the monitor turns on again - How can I make it off PERMANTLY till I click a set of hotkeys? Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
CyberSlug Posted April 3, 2006 Share Posted April 3, 2006 (edited) One way; but it might cause your script to not fully work.... EDIT: BlockInput might not fully work this way after all.... There is sometimes a setting in the device manager for the mice and keyboard giving you an option of whether those devices can bring your computer out of standby. My keyboard is set to bring comptuer out of standby, but my mouse is not. If I use BlockInput, I can move the mouse without making the monitor turn back on; but pressing any key turns on the monitor. Running, XP Pro sp2 by the way. ; Press Ctrl+Alt+Delete to reactivate #include <Misc.au3> Const $WM_SYSCommand = 274, $SC_MonitorPower = 61808, $Power_On = -1, $Power_Off = 2 $dll = DllOpen("user32.dll") $HWND = WinGetHandle(WinGetTitle("", "")) DllCall($dll, "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_Off) BlockInput(1) While 1 sleep(100) Wend Edited April 3, 2006 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
tradertt Posted April 5, 2006 Share Posted April 5, 2006 Running XP2 Pro too but when i tried it on my lap top, it does not work, input is blocked but the screen turns back on even without pressing Ctrl Alt Delete ... Free Flash Games Online | Car Modifications Articles | Free Arcade Games Online Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now