-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv2.vbs
25 lines (20 loc) · 837 Bytes
/
v2.vbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
set wshshell = wscript.CreateObject("wscript.shell")
While True
' Showing a popup, which disappears after 5 seconds
wshShell.Popup "It's time to take a break. Look at something 20 feet away for 20 seconds.", 5, "Take a Break", vbInformation
' Prompt user to take a break
Sapi.speak "It's time to take a break. Look at something 20 feet away for 20 seconds."
Dim Duration
Duration = 20
' Speak countdown from 1 to 20
For i = 1 to Duration
Sapi.speak i
WScript.Sleep 250 ' Wait 0.5 seconds between each number
Next
' Display a message box with the reminder
wshShell.Popup "Good, Next reminder in 20 minutes", 5, "Break Reminder", vbInformation
Sapi.speak "Great, Next reminder in 20 minutes"
' Wait for 20 minutes
WScript.Sleep(20 * 60 * 1000) ' 20 minutes in milliseconds
Wend