Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
my second project =)

 
Post new topic   Reply to topic Printable version
 View previous topic  asMaze - The greatest asm based maze g... Post :: Post problem with a switch statement  View next topic  
Author Message
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Wed Dec 13, 2006 8:03 pm    Post subject: my second project =) Reply to topic Reply with quote

I made a better version of my old project =)

Code: Show/Hide
#include <windows.h>
#include <iostream>
#include <stdlib.h>
using namespace std;

#define PI 3.1415926535897932384626433832785

int main()
{
    SetConsoleTitle("A3 Shortcuts V8");
    SetCursorPos(512,512);
       
   int menu1;
       
    HANDLE menu;
   menu = GetStdHandle(STD_OUTPUT_HANDLE);
   SetConsoleTextAttribute(menu,FOREGROUND_GREEN|BACKGROUND_BLUE);
   
   cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";   
   
   cout<<"+----------------------------+"<<endl;
   cout<<"| Welcome to A3 Shortcuts V8 |"<<endl;
   cout<<"|____________________________|"<<endl;
   cout<<"|                            |"<<endl;
   cout<<"| Value - Description        |"<<endl;
   cout<<"|____________________________|"<<endl;
   cout<<"| 1 - A3 Studios Home Page   |"<<endl;
    cout<<"| 2 - Metalic Rift Home Page |"<<endl;
    cout<<"| 3 - Hack Bin Home Page     |"<<endl;
    cout<<"| 4 - Mine Go Boom Forums    |"<<endl;
    cout<<"| 5 - Server Set Up Shanky   |"<<endl;
    cout<<"| 6 - Merv Bot Downloads     |"<<endl;
    cout<<"| 7 - Programs               |"<<endl;
    cout<<"| 8 - Credits/ other info    |"<<endl;
    cout<<"| 0 - closes program         |"<<endl;
    cout<<"+----------------------------+"<<endl;
   
    HANDLE text;
    text = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleTextAttribute(text,FOREGROUND_GREEN);
   
    cout<<"\n\n\nPlease type in the value and press enter: ";
    cin>>menu1;
   
    switch (menu1)
    {
           case 0:
               
                return 0;
                break;
               
           case 1:
               
                ShellExecute(NULL, "open", "http://a3studio.4t.com", NULL, NULL, SW_SHOWNORMAL);
                break;
               
           case 2:
               
                ShellExecute(NULL, "open", "http://www.fur4x-hebergement.net/foxnetworks/metallicrift/", NULL, NULL, SW_SHOWNORMAL);
                break;
               
           case 3:
               
                ShellExecute(NULL, "open", "http://hackbin.phpnet.us/", NULL, NULL, SW_SHOWNORMAL);
                break;
               
           case 4:
               
                ShellExecute(NULL, "open", "http://forums.minegoboom.com/", NULL, NULL, SW_SHOWNORMAL);
                break;
               
           case 5:
               
                ShellExecute(NULL, "open", "http://www.shanky.com/server/", NULL, NULL, SW_SHOWNORMAL);
                break;
               
           case 6:
               
                ShellExecute(NULL, "open", "http://catid.sscontinuum.com/", NULL, NULL, SW_SHOWNORMAL);
                break;
               
           case 7:
               
                int menu2;
               
                cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
               
                HANDLE menu;
                menu = GetStdHandle(STD_OUTPUT_HANDLE);
                SetConsoleTextAttribute(menu,FOREGROUND_GREEN|BACKGROUND_BLUE);
               
                cout<<"+-------------------------------------+"<<endl;
                cout<<"| 0 - Close programs                  |"<<endl;
                cout<<"| 1 - Area of a circle (very percise) |"<<endl;
                cout<<"| 2 - Count down Timer (super precise)|"<<endl;
                cout<<"+-------------------------------------+"<<endl;
               
                HANDLE text;
                text = GetStdHandle(STD_OUTPUT_HANDLE);
                SetConsoleTextAttribute(text,FOREGROUND_GREEN);
                               
                cout<<"\n\n\n\n\n\nPlease choose the Program you want to use: ";
               
                cin>>menu2;
               
                switch (menu2)
                {
                       case 0:
                           
                            return main();
                            break;
                           
                       case 1:
                           
                            double answer;
                            double radius;
                           
                            cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
                            cout<<"Please enter the radius (can use decimal points) :";
                            cin>>radius;
                            answer = PI * radius * radius;
                            cout<<"\n\n\n\nThe area of your circle is "<<answer<<"\n\n\n\n\n\n";
                            system("pause");
                            break;
                           
                       case 2:
                           
                            cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
                            cout<<"This is A3 Stop Watch, just type in how many seconds!";
                            cout<<"\nAlso you can use decimal points like 5.323";
                            cout<<"\n\n\n\n\nType in the seconds you want to time: ";
                           
                            double countdown;
                            cin>>countdown;
                           
                            while ( countdown > 0 )
                            {
                                  cout<< countdown <<" ,";
                                  Sleep(1000);
                                  --countdown;
                            }
                           
                            cout<<"Time up!\a\n\n";
                            system("pause");                           
                }         
                break;
                                                                                               
                case 8:
                     int info;
                     cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
                     cout<<"What would you like to view?"<<endl;
                     cout<<"1 - The first A3 Shortcuts project"<<endl;
                     cout<<"2 - Differences between A3 Shortcuts and A3 Shortcuts V18"<<endl;
                     cout<<"0 - Go back to main menu";
                     cout<<"\n\n\nPlease enter your choice: ";
                     cin>>info;
                     
                     switch (info)
                     {
                     case 1:
                          ShellExecute(NULL, "open", "http://forums.minegoboom.com/viewtopic.php?t=6988", NULL, NULL, SW_SHOWNORMAL);
                          break;
                     case 2:
                          cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
                          cout<<"There are view differences like added collored text and backrounds, then its not just";
                          cout<<"\nwebsite shortcuts but it has couple features like in Programs where you can find a";
                          cout<<"\narea of a circle calculator and a countdown timer. Also an icon was added!\n\n"<<endl;
                          system("pause");
                          break;
                     case 0:
                          return main();
                          break;
                     }
                     
                default: 
                         
                cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n ";
                cout<<"The Value you entered is unknown \a\n";
                system("pause");
                break;
    }
   
   
   
   return main();
   
}
   
   


here is a screen shot>>




untitled1.png - 12.64 KB
File downloaded or viewed 39 time(s)
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
The Apache
BECAUSE I'M A STUPID IDIOT


Age:32
Gender:Gender:Male
Joined: Jul 10 2006
Posts: 294
Location: High Wycombe
Offline

PostPosted: Thu Dec 14, 2006 8:20 am    Post subject: Reply to topic Reply with quote

you missed out 9.
Back to top
View users profile Send private message Add User to Ignore List Send email MSN Messenger
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Thu Dec 14, 2006 3:48 pm    Post subject: Reply to topic Reply with quote

you missed out 9.?
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:36
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Thu Dec 14, 2006 4:58 pm    Post subject: Reply to topic Reply with quote

He means you didn't get to option #9, but whatever. What a great piece of software. I'd use this anytime.
Back to top
View users profile Send private message Add User to Ignore List
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:33
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Wed Dec 20, 2006 9:27 pm    Post subject: Reply to topic Reply with quote

lol Very nice work. icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Assassin2684
Server Help Squatter


Age:33
Gender:Not sure
Joined: Jul 27 2004
Posts: 990
Location: Florida
Offline

PostPosted: Thu Dec 21, 2006 9:44 am    Post subject: Reply to topic Reply with quote

Very nice. Keep up the good work.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:36
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Thu Dec 21, 2006 8:25 pm    Post subject: Reply to topic Reply with quote

Oh the irony of this thread.
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Fri Dec 22, 2006 10:08 am    Post subject: Reply to topic Reply with quote

When you need to output a lot of text, it's best to make a long string for it and then output it with one call. For example,
Code: Show/Hide
const char *menu =
"+----------------------------+\n"
"| Welcome to A3 Shortcuts V8 |\n"
"|____________________________|\n"
"|                            |\n"
"| Value - Description        |\n"
"|____________________________|\n"
"| 1 - A3 Studios Home Page   |\n"
"| 2 - Metalic Rift Home Page |\n"
"| 3 - Hack Bin Home Page     |\n"
"| 4 - Mine Go Boom Forums    |\n"
"| 5 - Server Set Up Shanky   |\n"
"| 6 - Merv Bot Downloads     |\n"
"| 7 - Programs               |\n"
"| 8 - Credits/ other info    |\n"
"| 0 - closes program         |\n"
"+----------------------------+\n";

cout << menu;


Of course, I still also recommend using stdio.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 645 page(s) served in previous 5 minutes.

phpBB Created this page in 0.484447 seconds : 35 queries executed (92.3%): GZIP compression disabled