-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
269 lines (241 loc) · 9.36 KB
/
main.cpp
File metadata and controls
269 lines (241 loc) · 9.36 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
#include <bits/stdc++.h>
#include <windows.h>
#define thunder main
#define ll long long int
#define forep(p, q, r) for (ll(p) = (q); (p) < (r); (p)++)
#define foreq(p, q, r) for (ll(p) = (q); (p) <= (r); (p)++)
#define Aradhya ios_base::sync_with_stdio(false);
#define Pitlawar \
cin.tie(NULL); \
cout.tie(NULL);
using namespace std;
void greet()
{
// current date and time based on your system timezone
time_t ata = time(0);
tm *time = localtime(&ata);
if (time->tm_hour < 12)
{
cout << "Shubh Sakal Mitra" << endl;
string vakya = "Shubh Sakal Mitra";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
}
else if (time->tm_hour >= 12 && time->tm_hour <= 16)
{
cout << "Dupar Zali ahe" << endl;
string vakya = "Dupar Zali ahe";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
}
else if (time->tm_hour > 16 && time->tm_hour < 24)
{
cout << "Sandhyakadi Kay Kaam" << endl;
string vakya = "Sandhyakadi Kay Kaam";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
}
}
void taarik()
{
time_t now = time(0);
char *dt = ctime(&now);
cout << "Aj chi Taarik ahe " << endl
<< dt << endl;
}
void timer(ll hor=0, ll mon=0, ll soc=0){
ll hr=0,min=0,sec=0;
while(true){
Sleep(1000);
system("cls");
cout<<"\n\n\n\n";
cout<<"&&&&&&&&&&&&&&&&&&&&&&&&&&&&& T I M E R &&&&&&&&&&&&&&&&&&&&&&&&&&&&&";
cout<<"\n";
cout<<hr<<" hours : "<<min<<" minutes : "<<sec<<" seconds : \n";
if(hr==hor && min==mon && sec==soc){
Beep(750,800);
break;
}
sec++;
if(sec==60){
sec=0;
min++;
if(min==60){
min=0;
hr++;
}
}
}
}
int thunder()
{
system("cls");
system("color ");
cout << "\t\t\t****************************KAY MHANTOS BHAU****************************>" << endl;
string password; // to take password
string ch; // to take cmd from the user
do
{
cout << "&&&&&&&&&&&&&&&&&&&&&&&" << endl;
cout << "| ENTER YOUR PASSWORD |" << endl;
cout << "&&&&&&&&&&&&&&&&&&&&&&&" << endl
<< endl;
string vakya = "Password Taak";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
cin >> password;
STARTUPINFO startInfo = {0};
PROCESS_INFORMATION processInfo = {0};
if (password == "thunder")
{
cout << "\n<&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&>\n\n";
greet();
do
{
cout << "\n<==================================================================================================>\n\n";
cout << endl
<< "Kay madat kru...." << endl
<< endl;
string vakya = "Kay madat kru";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
cout << "Kaam Sang ===>";
getline(cin,ch);
cout << endl;
cout << "Ghe tuza uttar ===> ";
if (ch == "hi" || ch == "hey" || ch == "hello" || ch == "Namaskar")
{
cout << "Namaskar Mitra....." << endl;
string vakya = "Namaskar Mitra";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
}
else if (ch == "bye" || ch == "stop" || ch == "exit")
{
cout << "Good Bye dost, have a nice day!!!!" << endl;
string vakya = "Good Bye dost, have a nice day";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
exit(0);
}
else if (ch == "who are you" || ch == "Tu kon hai?" || ch == "about")
{
cout << "Tuza javadcha Mitra !!!" << endl;
string vakya = "Tuza javadcha Mitra";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
}
else if(ch=="shut down"){
system("C:\\windows\\system32\\shutdown /s /t 0");
}
else if(ch=="set a timer"){
ll hr,min,sec;
cout<<"Enter timer for hr:min:sec==>";
cin>>hr>>min>>sec;
string vakya = "Timer lagat ahe";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
timer(hr,min,sec);
}
else if (ch == "how are you" || ch == "Kasa ahes" || ch == "how is your day")
{
cout << "Mi ekdum changla , tuza sang.." << endl;
string vakya = "Mi ekdum changla , tuza sang";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
}
else if (ch == "time" || ch == "date")
{
// make function to show date and time
taarik();
}
else if (ch == "Notepad ughad")
{
cout << "Ughadat aho....." << endl;
string vakya = "Ughadat aho";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
CreateProcess(TEXT("C:\\Windows\\notepad.exe"), NULL, NULL, NULL, FALSE, NULL, NULL, NULL, &startInfo, &processInfo);
}
else if (ch == "word ughad")
{
cout << "Ughadat aho....." << endl;
string vakya = "Ughadat aho";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
CreateProcess(TEXT("C:\\Windows\\word.exe"), NULL, NULL, NULL, FALSE, NULL, NULL, NULL, &startInfo, &processInfo);
}
else if (ch == "excel ughad")
{
cout << "Ughadat aho....." << endl;
string vakya = "Ughadat aho";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
CreateProcess(TEXT("C:\\Windows\\excel.exe"), NULL, NULL, NULL, FALSE, NULL, NULL, NULL, &startInfo, &processInfo);
}
else if (ch == "google ughad")
{
cout << "google ughadat ahe....." << endl;
string vakya = "google ughadat ahe";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
system("start https://www.google.com");
}
else if (ch == "youtube ughad")
{
cout << "Youtube ughadat ahe....." << endl;
string vakya = "Youtube ughadat ahe";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
system("start https://www.youtube.com");
}
else if (ch == "instagram ughad")
{
cout << "instagram ughadat ahe....." << endl;
string vakya = "instagram ughadat ahe";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
system("start https://www.instagram.com");
}
else
{
cout << "neat bol , kalal nhi !!!" << endl;
string vakya = "neat bol , kalal nhi ";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
}
} while (1);
}
else
{
system("cls");
cout << "\t\t\t&&&&&&&&&&&&&&&&&&&&&&&&&&& YAA BHAU &&&&&&&&&&&&&&&&&&&&" << endl;
cout << "======================" << endl;
cout << "X Chukla Password X" << endl;
cout << "======================" << endl
<< endl;
string vakya = "Chukla Password, Barobar wala taak";
string cmd = "espeak \"" + vakya + "\"";
const char *charcmd = cmd.c_str();
system(charcmd);
}
} while (1);
return 0;
}