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
|
#include <iostream>
#include <Windows.h>
#include <string>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
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
//----------------------------------------------------------inputs
string input = "nothing";
cout << "Hi i am your new and own assistent, my name is alex\n";
Sleep(2000);
while(true){
cout << "what do you want me to do?\n" << endl;
getline(cin, input);
cout << "you said \n" << input;
if (input == "open weather\n" || input == "whats the weather like\n" || input == "whats the weather like today?\n"){
ShellExecute(NULL, "open", weather.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open blocket\n"){
ShellExecute(NULL, "open", blocket.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open email\n" || input =="check my email\n" || input =="do i have any new mails?\n" || input =="check my mail\n" || "open mail\n"){
ShellExecute(NULL, "open", mail.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
if (input == "open bikroy\n" || input == "whats new on bikroy\n?"){
ShellExecute(NULL, "open", bikroy.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
}
return 0;
}
|