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
|
#include <iostream>
#include <Windows.h>
#include <string>
using namespace std;
int main()
{
//----------------------------------------------------------CMDS
int cmd = 0;
//----------------------------------------------------------URLs
string weather = "https://www.ventusky.com/"; //url
string blocket = "https://www.blocket.se/"; //url
string mail = "https://www.outlook.com/"; //url
string bikroy = "https://www.bikroy.com"; //url
string google = "www.google.com"; //url
string facebook = "www.facebook.com"; //url
string elgiganten = "www.elgiganten.se"; //url
string netonnet = "www.netonnet.se"; //url
string jula = "www.jula.se"; // url
string youtube = "www.youtube.com"; //url
string microsoft = "www.microsoft.com"; //url
string paint = "mspaint"; //app
string extra; // url or app
//----------------------------------------------------------inputs
string input = "nothing";
cout << "Hi i am your new assistent, my name is alex\n";
Sleep(2000);
while(true){
cout << "what do you want me to do?" << endl;
getline(cin, input);
cout << "you said " << input << endl;
if (input == "open weather" || input == "whats the weather like" || input == "whats the weather like today?"){
ShellExecute(NULL, "open", weather.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open blocket" || input == "whats new on blocket"){
ShellExecute(NULL, "open", blocket.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open email" || input =="check my email" || input =="do i have any new mail?" || input =="check my mail" || input =="open mail"){
ShellExecute(NULL, "open", mail.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open bikroy" || input == "whats new on bikroy?"){
ShellExecute(NULL, "open", bikroy.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open google" || input == "open a web browser" || input == "open the best web browser"){
ShellExecute(NULL, "open", google.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open facebook" || input == "whats new on facebook?" || input == "open the most popular social media"){
ShellExecute(NULL, "open", facebook.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open elgiganten" || input == "whats new on elgiganten?" || input == "whats elgiganten?"){
ShellExecute(NULL, "open", elgiganten.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open netonnet" || input == "open net on net" || input == "whats new on netonnet?" || input == "whats new on net on net?"){
ShellExecute(NULL, "open", netonnet.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open jula" || input == "whats new on jula?" || input == "whats newest on jula?"){
ShellExecute(NULL, "open", jula.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open microsoft" || input == "whats new on microsoft?" || input == "whats the latest windows version?" || input == "whats the newest software?" || input == "whats the newest version of windows?"){
ShellExecute(NULL, "open", microsoft.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open paint" || input == "open a paint program" || input == "open a program where i can paint" || input == "whats the pre-downloaded paint program?")
ShellExecute(NULL, "open", paint.c_str(), NULL, NULL, SW_SHOWNORMAL);
if (input == "open youtube" || input == "whats new on youtube?" || input == "whats trending on youtube?" || input == "whats the best trending on youtube?")
{ShellExecute(NULL, "open", youtube.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
else {
cout << "you did something wrong there, please enter the url or app
(exactly) you tried to enter" << endl;
getline(cin, extra);
ShellExecute(NULL, "open", extra.c_str(), NULL, NULL, SW_SHOWNORMAL);
break;
}
} //while
}// int main
| |