Console

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Batch Artist
Posts: 22
Joined: 18 Oct 2013 05:28

Console

#1 Post by Batch Artist » 18 Oct 2013 05:43

I am currently designing a Console that will run as a Multi-Purpose File. I was wondering if anyone knew some features that could be added, it can go from a Calculator (Which I will add in) to a Clock.

Here is the code I currently have as an example:

Code: Select all

@ECHO off
TITLE Lane Console
:LOGIN
COLOR 7
CLS
ECHO Welcome to the Login Screen!
SET /P user=username:
cls
SET /P pass=password:
If "%user%"=="Jordon" IF "%pass%"=="Password" GOTO AUTH
IF NOT "%user%"=="Jordon" IF NOT "%pass%"=="Alternate1" GOTO Denied
:AUTH
cls
SET /P auth=Authentification:
If "%auth%"=="0000" GOTO LOGGING
If not "%auth%"=="0000" GOTO EXIT
CLS
COLOR C
ECHO ACCESS DENIED!
GOTO LOGGING

:LOGGING
COLOR A
CLS
ECHO %User% %pass% >>Logged.DATA
ECHO %User% %pass% >Logged.DATA
CLS
GOTO MENU

:MENU
CLS
COLOR 7
ECHO CopyRight(C) and Reserved(R) for Lane Console
ECHO.
ECHO.
ECHO 1) Password Generator
ECHO 2) PING
ECHO 3) Notes
ECHO 4) Exit
SET /P OPT=
IF %OPT%==1 GOTO Start
IF %OPT%==Password Generator GOTO Start
IF %OPT%==2 GOTO PING
IF %OPT%==IP Configuartion GOTO PING
IF %OPT%==3 GOTO Notes
IF %OPT%==Notes GOTO Notes
IF %OPT%==4 GOTO Exit
IF %OPT%==Exit GOTO Exit

:PasswordGen

:Start
title Password Generator
echo I will make you a new password.
echo Please write the password down somewhere in case you forget it.
echo ----------------------------------------­-----------------------
echo 1) 1 Random Password
echo 2) 5 Random Passwords
echo 3) 10 Random Passwords
echo Input your choice
set input=
set /p input= Choice:
if %input%==1 goto B if NOT goto Start2
if %input%==2 goto C if NOT goto Start2
if %input%==3 goto D if NOT goto Start2

:B
cls
echo Your password is %random%
echo Now choose what you want to do.
echo 1) Go back to the beginning
echo 2) Goto Main Menu
set input=
set /p input= Choice:
if %input%==1 goto Start2 if NOT goto Start
if %input%==2 goto Exit if NOT goto Start

:Exit
Exit

:C
cls
echo Your 5 passwords are %random%, %random%, %random%, %random%, %random%.
echo Now choose what you want to do.
echo 1) Go back to the beginning
echo 2) Goto Main Menu
set input=
set /p input= Choice:
if %input%==1 goto Start2 if NOT goto Start
if %input%==2 goto Exit if NOT goto Start

:D
cls
echo Your 10 Passwords are %random%, %random%, %random%, %random%, %random%, %random%, %random%, %random%, %random%, %random%
echo Now choose what you want to do.
echo 1) Go back to the beginning
echo 2) Goto Main Menu
set input=
set /p input= Choice:
if %input%==1 goto Start2 if NOT goto Start
if %input%==2 goto Exit if NOT goto Start Start

:PING

ECHO List of Sites to Ping.
ECHO 1) Google
ECHO 2) YouTube
ECHO 3) FaceBook
ECHO 4) Outlook
ECHO 5) Ask.fm
ECHO 6) Twitter
ECHO 7) Instagram
ECHO 8) 192.168.1.1
SET /P OPT2= 
IF %OPT2%==1 GOTO Google
IF %OPT2%==2 GOTO YouTube
IF %OPT2%==3 GOTO FaceBook
IF %OPT2%==4 GOTO Outlook
IF %OPT2%==5 GOTO Ask
IF %OPT2%==6 GOTO Twitter
IF %OPT2%==7 GOTO Insta
IF %OPT2%==8 GOTO I.P

:Google
Ping www.Google.com
Pause
GOTO MENU
:YouTube
Ping www.YouTube.com
Pause
GOTO MENU
:FaceBook
Ping www.FaceBook.com
Pause
GOTO MENU
:Outlook
Ping www.Outlook.com
Pause
GOTO MENU
:Ask
Ping www.Ask.fm
Pause
GOTO MENU
:Twitter
Ping www.Twitter.com
Pause
GOTO MENU
:Insta
Ping www.Instagram.com
Pause
GOTO MENU
:I.P
Ping 192.168.1.1
Pause
GOTO MENU
:Notes
echo Commands:
echo type CLS to clear the chat log.
echo type EXIT to quit the chat room.
echo just hit enter to update screen.
echo.
SET /p username=What is your name?
ECHO What is the I.P Address you wish to communicate with?
SET /p IP
ECHO
echo %username% has joined. >> log.dat
CLS
goto CHATLOOP
SET lastmessage=""
:CHATLOOP
cls
TYPE log.dat
echo.
echo.
SET /p message=Say:
SET thismessage="%message%"
IF %thismessage% == "EXIT" echo %username% has left the chat room. >> log.dat
IF %thismessage% == "EXIT" exit
IF %thismessage% == "CLS" echo %username% has cleared the chat log. > log.dat
IF %thismessage% == "CLS" set message=Empty
IF %thismessage% == "CLS" set lastmessage="Empty"
IF %thismessage% == "CLS" goto CHATLOOP
IF %thismessage% == %lastmessage% goto CHATLOOP
echo %username%: %message% >> log.dat
SET lastmessage="%message%"
GOTO CHATLOOP

:Denied

cls
COLOR C
ECHO.
ECHO =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ECHO.
ECHO                    ACCESS
ECHO                    DENIED
ECHO.
ECHO =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ECHO.
ECHO.
ECHO.
Pause
GOTO Login



That's the code, hope you guys can help me out!
(By the way, the Password Generator is to spice things up).

einstein1969
Expert
Posts: 976
Joined: 15 Jun 2012 13:16
Location: Italy, Rome

Re: Console

#2 Post by einstein1969 » 18 Oct 2013 06:08

hi,

For the clock you can read here Drawing rudimentary graphics in text mode

is a bit complex but there is much to learn.

Einstein1969

Batch Artist
Posts: 22
Joined: 18 Oct 2013 05:28

Re: Console

#3 Post by Batch Artist » 18 Oct 2013 06:36

einstein1969 wrote:hi,

For the clock you can read here Drawing rudimentary graphics in text mode

is a bit complex but there is much to learn.

Einstein1969



Thank you friend :)

Post Reply