How to set what wondows 11 do after closing notebook lid?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
wlashack
Posts: 39
Joined: 25 Aug 2019, 01:28

How to set what wondows 11 do after closing notebook lid?

Post by wlashack » 02 Dec 2023, 04:20

Hello,
I would like to have a shortcuts that switch between "Do nothing" and "Sleep" settings that can be found in Control Panel > Hardware and Sound > Power Options > Choose what closing the lid does > When I close the lid, where there is that option for “On Battery” and “Plugged in”. I would like to set both to "Do nothing" by pressing Win+L, and set both to "Sleep" by pressing Win+Shift+L. Is this possible?
I cannot write scripts, I am only able to very slightly modify those written by community so I ask to write one, if someone can help. Thanks.

Return to “Ask for Help (v2)”