Sign in to follow this  
Followers 0
Evil_Has_Survived

Script For Monitor

5 posts in this topic

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 :mellow::) lol, but im getting a new monitor soon


Thanks in advance

Share this post


Link to post
Share on other sites



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 :mellow::) 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)

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0