AutoHotkey – One-Click Auto Shutdown
Have you ever had to wait in front of your computer before it shuts down? Once it starts closing all background applications, open windows and other things you don’t even know about, it takes a long while before it finally stops.
There is a DOS command that can execute a complete stop: the shutdown command. Some parameters can be added to it, but for the purpose, let’s stay with the essentials to force you computer to shut down:
shutdown –s –f –t 0
It is easy to put it into AutoHotkey to make it done automatically. However, if you do so, all current applications will close without warning, and you may lose unsaved data. Therefore, I added a simple message box to prompt just before proceeding:
MsgBox, 52, Warning, Computer will shut down. Proceed?
IfMsgBox, Yes, run, shutdown -s -f -t 0
Return
If you click the “Yes” button, the computer will not ask and will make a complete stop. There is now an “OFF” key on my Enterpad that helps me leave my computer station as fast as possible!
Edmond
Related posts:
Auto-Hotkeys for AutoHotkey
Are you manually doing these simple tasks over and over again? Starting webpages like “google.com”,...
AutoHotkey – Éteindre votre ordinateur en un seul coup
Avez-vous déjà eu à attendre que votre ordinateur ferme tous les programmes en arrière-plan, les...
AutoHotkey – Display an on-screen message
When I use AutoHotkey to run background tasks, download files and prepare backups, I want...
AutoHotkey – Afficher un message à l’écran
Lorsque j’utilise AutoHotkey pour lancer des tâches en arrière-plan, télécharger des trucs, préparer une copie...