From 31e1db8cad4d40d1d13ea972b0c936b65daf1497 Mon Sep 17 00:00:00 2001 From: Marc-Frank <74321912+Marc-Frank@users.noreply.github.com> Date: Wed, 10 Nov 2021 11:07:04 +0100 Subject: [PATCH] Update NoSleep.vbs added eval() to line 4 allows to input calculations like 8*60 --- KeepWindowsAwake/NoSleep.vbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KeepWindowsAwake/NoSleep.vbs b/KeepWindowsAwake/NoSleep.vbs index c8ae1a7..451dfdd 100644 --- a/KeepWindowsAwake/NoSleep.vbs +++ b/KeepWindowsAwake/NoSleep.vbs @@ -1,7 +1,7 @@ Dim objShell, lngMinutes, boolValid Set objShell = CreateObject("WScript.Shell") -lngMinutes = InputBox("How long you want to keep your system awake?" & Replace(Space(5), " ", vbNewLine) & "Enter minutes:", "Awake Duration") 'we are replacing 5 spaces with new lines +lngMinutes = eval(InputBox("How long you want to keep your system awake?" & Replace(Space(5), " ", vbNewLine) & "Enter minutes:", "Awake Duration")) 'we are replacing 5 spaces with new lines If lngMinutes = vbEmpty Then 'If the user opts to cancel the process 'Do nothing Else