err0r.net


<my little piece of the internet/>


Category: Code Snippets

Instantly Sleep Your Monitors With a One-Click BAT File (Windows 11)


avatar
Want a quick way to turn off your monitors immediately, without putting your PC to sleep? This tiny batch file does exactly that. Your screens will go dark instantly and wake back up the moment you move the mouse or hit a key.
What this does
This script sends Windows the “turn off display” command. It does not:
shut down your PC
hibernate
close apps
stop downloads, streams, or music
It only puts your display(s) to sleep until you interact again. (...)

Sample of code syntax highlighter


avatar

Simple javascript output example

<!DOCTYPE html>
<html>
<body>

<h2>My First Web Page</h2>
<p>My first paragraph.</p>

<p>Never call document.write after the document has finished loading.
It will overwrite the whole document.</p>

<script>
document.write(5 + 6);
</script>

</body>
</html>