From c656b6f73876cfbfa323bdc06e08d87e6089c1e6 Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Fri, 29 Oct 2021 03:53:07 +0100 Subject: [PATCH] stay awake --- win/stay_awake.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 win/stay_awake.ps1 diff --git a/win/stay_awake.ps1 b/win/stay_awake.ps1 new file mode 100644 index 0000000..7d40cfe --- /dev/null +++ b/win/stay_awake.ps1 @@ -0,0 +1,9 @@ +$wsh = New-Object -ComObject WScript.Shell +$minutes = 15 +do{ + $minutes-=1; + # Send Shift+F15 + $wsh.SendKeys('+{F15}') + Start-Sleep -seconds 59 +}until($minutes < 0) +# Thank you to http://www.zhornsoftware.co.uk/caffeine/ \ No newline at end of file -- 2.47.3