- ID de exploración:
- 6ff11e27-db7f-41bc-b9fc-3a67ca941a39Finalizado
- URL enviada:
- https://dlaa.me/Insomnia/
- Informe finalizado:
Enlaces: 1 encontrados
Los enlaces salientes identificados en la página
Enlace | Texto |
---|---|
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate | SetThreadExecutionState Win32 Function |
Variables JavaScript: 3 encontradas
Las variables JavaScript globales cargadas en el objeto de ventana de una página son variables declaradas fuera de las funciones y a las que se puede acceder desde cualquier lugar del código en el ámbito actual
Nombre | Tipo |
---|---|
onbeforetoggle | object |
documentPictureInPicture | object |
onscrollend | object |
Mensajes de registro de la consola: 3 encontrados
Mensajes registrados en la consola web
Tipo | Categoría | Registro |
---|---|---|
warning | other |
|
warning | other |
|
warning | other |
|
HTML
El cuerpo HTML sin procesar de la página
<!DOCTYPE html><html lang="en"><head>
<meta charset="utf-8">
<link href="../tool.css" rel="stylesheet" type="text/css">
<meta name="description" content="A simple utility to stop your computer from going to sleep.">
<title>Insomnia</title>
</head>
<body>
<div class="center">
<h1>Insomnia</h1>
<p>by David Anson</p>
</div>
<h2>Overview</h2>
<p>
The default power settings for Windows are configured so a computer will go to sleep after 15-30 minutes of inactivity (e.g., no mouse or keyboard input).
This is great because a computer that's not being used doesn't need to be running at full power.
By letting an idle machine enter sleep mode, the user benefits from a significant reduction in electricity use, heat generation, component wear, etc..
And because sleep preserves the state of everything in memory, it's quick to enter, quick to exit, and doesn't affect your workflow.
All the same applications continue running, windows stay open and where they were, and so on.
Sleep mode is a <em>Good Thing</em>.
</p>
<p>
But sometimes a computer is busy even though you aren't using the mouse and keyboard; common examples include playing a movie, burning a DVD, streaming music, etc..
In these cases, you do <strong>not</strong> want the machine to go to sleep because you're using it - even though you're not <em>actually</em> using it!
So most media players and disc burners tell Windows not to go to sleep while they're running.
In fact, there's a dedicated API for exactly this purpose: the <a href="https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate">SetThreadExecutionState Win32 Function</a>.
</p>
<p>
But what about those times when the computer is doing something useful and the relevant program does not suppress the default sleep behavior?
It might be downloading a large file, re-encoding a music collection, or backing up the hard drive, for example.
In times like this, you don't want the machine to go to sleep <strong>right now</strong>, but are otherwise happy with the default sleep behavior.
Unfortunately, the easiest way I know of to temporarily suppress sleeping is to go to Control Panel, open the Power Options page, change the power plan settings, commit them - and then remember to undo everything when you're done.
It's not hard; but it's kind of annoying...
</p>
<img src="Insomnia-Native.png" alt="Insomnia on Windows 7" width="342" height="242">
<p>
<strong>Insomnia makes it better!</strong>
Insomnia is a simple program that calls the <code>SetThreadExecutionState</code> API to disable sleep mode for as long as it's running.
Closing the Insomnia window immediately returns to whatever sleep mode was in effect before it was run.
Yes, it's that simple!
</p>
<blockquote>
<strong>Aside</strong>: To be clear, the <em>display</em> can still go to sleep and power off - it's just sleep for the <em>computer</em> that is blocked.
Similarly, if you <em>tell</em> the machine to go to sleep by hitting the power button, it will still do so.
</blockquote>
<h2>Download</h2>
<p>
<a href="http://dlaa.me/Samples/Insomnia/Insomnia.zip">Insomnia.zip</a> - 318 KB ZIP contains the <strong>32-bit (recommended)</strong>, 64-bit, and .NET builds of Insomnia and the source code for everything.
</p>
<h2>Notes</h2>
<img src="Insomnia-Tray.png" alt="Insomnia in the system tray" width="279" height="103" style="float: right">
<ul>
<li>
Insomnia started as a .NET program, but later got separate, native-code versions for 32-bit and 64-bit machines.
You can run the managed version if you feel like it, but be aware that the native versions start faster and have fewer resource requirements.
For more details, <a href="/blog/post/10104830">click here</a>.
</li>
<li>
The 32-bit native version is the recommended version because it runs everywhere (including on 64-bit operating systems and old hardware) and consumes the fewest resources.
</li>
<li>
For directions on how to create a shortcut to start Insomnia minimized (possibly to run during login), <a href="/blog/post/10104830">click here</a>.
</li>
<li>
Insomnia supports all recent Windows operating systems - even Windows XP.
For more, <a href="/blog/post/10144913">click here</a>.
</li>
</ul>
<h2>Blog Posts</h2>
<ul>
<li><a href="/blog/post/9901642">Give your computer insomnia [Free tool and source code to temporarily prevent a machine from going to sleep!]</a>, September, 2009</li>
<li><a href="/blog/post/9956802">The customer is always right [Updated free tool and source code to prevent a machine from going to sleep!]</a>, February, 2010</li>
<li><a href="/blog/post/10104830">No rest for the weary [Free tool and source code to temporarily prevent a computer from entering sleep mode - now available for .NET, 32-bit, and 64-bit!]</a>, December 2010</li>
<li><a href="/blog/post/10144913">What next, a DOS version?? [Free tool and source code to temporarily prevent a computer from entering sleep mode - 32-bit and 64-bit versions now support Windows XP!]</a>, March 2011</li>
</ul>
</body></html>