-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGreetBot.vbs
64 lines (56 loc) · 1.02 KB
/
GreetBot.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
' Created by Nikhil Verma
' Change Nikhil Verma with your own name or user name
User = "Nikhil Verma"
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
if hour(time) < 12 then
Sapi.speak "Good Morning" + User
else
if hour(time) > 12 then
if hour(time) >= 16 then
Sapi.speak "Good evening" + User
else
Sapi.speak "Good afternoon" + User
end if
end if
end if
Sapi.speak "The current time is "
if hour(time) > 12 then
Sapi.speak hour(time)-12
else
if hour(time) = 0 then
Sapi.speak "12"
else
Sapi.speak hour(time)
end if
end if
if minute(time) < 10 then
Sapi.speak "o"
if minute(time) < 1 then
Sapi.speak "clock"
else
Sapi.speak minute(time)
end if
else
Sapi.speak minute(time)
end if
if hour(time) > 12 then
Sapi.speak "P.M."
else
if hour(time) = 0 then
if minute(time) = 0 then
Sapi.speak "Midnight"
else
Sapi.speak "A.M."
end if
else
if hour(time) = 12 then
if minute(time) = 0 then
Sapi.speak "Noon"
else
Sapi.speak "P.M."
end if
else
Sapi.speak "A.M."
end if
end if
end if