Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Me and a friend are making a little messenger batch.
Code:
@echo off
setLocal EnableDelayedExpansion
cls
title Dancing Tangerine (Beta 2.1.6):login
cls
color 07
cls
echo Welcome to Dancing Tangerine (2008, All Rights Reserved, Breakout House Inc.)
echo Type your password or 'register' to get started (type 'exit' to exit)...
set /p usrpassword=
IF !usrpassword!==blah goto DrummerDude952
IF !usrpassword!==blah1 goto guest
IF !usrpassword!==blah2 goto Administrator
IF !usrpassword!==blah3 goto MisterCool
IF !usrpassword!==register goto registration
IF !usrpassword!==exit goto exit:wrongpass
echo You entered an invalid password, try again...
pause
goto login:MisterCool
cls
set user=MisterCool
echo Online > "L:\Dancing Tangerine\Status\!user!"
goto colorcheck:DrummerDude952
cls
set user=DrummerDude952
echo Online > "L:\Dancing Tangerine\Status\!user!"
goto colorcheck:Administrator
cls
set user=Administrator
echo Online > "L:\Dancing Tangerine\Status\!user!"
goto colorcheck:Guest
cls
set user=Guest
echo Online > "L:\Dancing Tangerine\Status\!user!"
goto colorcheck:colorcheck
cls
:findtheme
cls
IF exist "L:\Dancing Tangerine\SystemFiles\ColorPrefs\theme_!user!" goto findtypetheme
:findred
Find "0c" "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
IF ErrorLevel 1 goto findyellow
color 0c
:findyellow
Find "0e" "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
IF ErrorLevel 1 goto findgreen
color 0e
:findgreen
Find "0a" "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
IF ErrorLevel 1 goto findblue
color 0a
:findblue
Find "09" "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
IF ErrorLevel 1 goto findpurple
color 09
:findpurple
Find "05" "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
IF ErrorLevel 1 goto finddefault
color 0d
:finddefault
Find "color" "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
IF ErrorLevel 1 goto main
color 07
goto main:findtypetheme
cls
set /p theme=<"L:\Dancing Tangerine\SystemFiles\ColorPrefs\theme_!user!"
color !theme!:main
cls
echo Welcome, !user!...
echo.
echo Pick an option.
echo 1. Messaging
echo 2. Check Online Status
echo 3. DT-Mail
echo 4. Color
echo 5. Sign Out
echo 6. Check for Updateset /p startoption=
IF !startoption!==1 goto messaging
IF !startoption!==2 goto onlinestatus
IF !startoption!==3 goto dtmail
IF !startoption!==4 goto color
IF !startoption!==5 goto signout
IF !startoption!==6 goto updateecho Invaid entry, try again...
pause
goto main:messaging
cls
start iexplore.exe "file:\\\L:\Dancing Tangerine\SystemFiles\DTChat.txt"
:nobrowsermessaging
cls
echo Dancing Tangerine Chat
echo.
echo Type your message and press enter (type 'more' for more options)...
echo.
set /p message=
IF !message!==more goto messagingmore
IF !message!==cls goto clearecho !message! (!user!) >> "L:\Dancing Tangerine\SystemFiles\DTChat.txt"
goto nobrowsermessaging:clear
echo Press 'F5' to load new messages... > "L:\Dancing Tangerine\SystemFiles\DTChat.txt"
echo. >> "L:\Dancing Tangerine\SystemFiles\DTChat.txt"
goto nobrowsermessaging:messagingmore
cls
echo More. Type the option number to choose...
echo.
echo 1. Return to Messaging
echo 2. Return to Mainset /p messagingmore=
IF !messagingmore!==1 goto nobrowsermessaging
IF !messagingmore!==2 goto main
echo Invalid entry, try again...
goto messagingmore:color
cls
echo Type a color... (red, yellow, green, blue, purple, default, or themes)
echo.
set /p colorprefs=
IF exist "L:\Dancing Tangerine\SystemFiles\ColorPrefs\regcolor\!colorprefs!" goto IFcolor
cls
echo Invalid color. Try again...
pause
goto color:IFcolor
cls
IF !colorprefs!==red goto red
IF !colorprefs!==yellow goto yellow
IF !colorprefs!==green goto green
IF !colorprefs!==blue goto blue
IF !colorprefs!==purple goto purple
IF !colorprefs!==default goto default
IF !colorprefs!==themes goto themes:red
echo 0c > "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
del "L:\Dancing Tangerine\SystemFiles\ColorPrefs\theme_!user!"
cls
echo Color saved...
pause
goto colorcheck
:yellow
echo 0e > "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
del "L:\Dancing Tangerine\SystemFiles\ColorPrefs\theme_!user!"
cls
echo Color saved...
pause
goto colorcheck
:green
echo 0a > "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
del "L:\Dancing Tangerine\SystemFiles\ColorPrefs\theme_!user!"
cls
echo Color saved...
pause
goto colorcheck
:blue
echo 09 > "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
del "L:\Dancing Tangerine\SystemFiles\ColorPrefs\theme_!user!"
cls
echo Color saved...
pause
goto colorcheck
:purple
echo 05 > "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
del "L:\Dancing Tangerine\SystemFiles\ColorPrefs\theme_!user!"
cls
echo Color saved...
pause
goto colorcheck
:default
echo color > "L:\Dancing Tangerine\SystemFiles\ColorPrefs\!user!"
del "L:\Dancing Tangerine\SystemFiles\ColorPrefs\theme_!user!"
cls
echo Color saved...
pause
goto colorcheck:themes
cls
echo Type in the two letters/numbers following the theme name...
echo.
type "L:\Dancing Tangerine\SystemFiles\ColorPrefs\regcolor\themes.txt"
echo.
set /p themechoice=
echo !themechoice! > "L:\Dancing Tangerine\SystemFiles\ColorPrefs\theme_!user!"
cls
echo Theme choice saved...
echo.
pause
goto colorcheck:onlinestatus
cls
IF exist "L:\Dancing Tangerine\Status\DrummerDude952" echo DrummerDude952 is online!
IF exist "L:\Dancing Tangerine\Status\Administrator" echo The Administrator is online!
IF exist "L:\Dancing Tangerine\Status\Guest" echo Guest is online!
IF exist "L:\Dancing Tangerine\Status\MisterCool" echo MisterCool is online!echo.
echo Press any key to return to the main menu...
pause > nul
goto main:dtmail
cls
echo Welcome, !user! to dtmail, type an option number...
echo.
echo 1. Send a Message.
echo 2. Check Messages.
echo 3. Go to Main Menu.
set /p dtmail=
IF !dtmail!==1 goto senddtmail
IF !dtmail!==2 goto receivedtmail
IF !dtmail!==3 goto main:senddtmail
:to
cls
set /p to=To:
IF exist=="L:\Dancing Tangerine\SystemFiles\RegUsr\!to!" goto dtmailwrite
goto toerror
:dtmailwrite
cls
set /p subject=Subject:
cls
set /p dtmailmessage=Message:
echo !dtmailmessage! > "L:\Dancing Tangerine\dtmail\!to!\!subject!_(!user!).txt"
COPY "L:\Dancing Tangerine\dtmail\!to!\!subject!_(!user!).txt" "L:\Dancing Tangerine\dtmail\!user!\Sent\!subject!_(!to!).txt"
cls
echo Message Sent!
pause
cls
goto dtmail:toerror
cls
echo The username you typed is invalid, try again...
pause
goto to:receivedtmail
cls
start iexplore.exe "file:\\\L:\Dancing Tangerine\dtmail\!user!\"
echo Press any key to return to dtmail...
pause > nul
goto dtmail:registration
cls
echo Welcome to Dancing Tangerine. Type your name.
set /p name=
echo.
echo Type your desired username (numbers and letters only, no spaces or symbols)...
set /p desuser=
echo.
echo Type your desired password...
set /p despass=
echo Name:!name! >> "L:\Dancing Tangerine\SystemFiles\Administration\Registration\Pending"
echo Desired Username:!desuser! Desired Password:!despass! >> "L:\Dancing Tangerine\SystemFiles\Administration\Registration\Pending"
echo. >> "L:\Dancing Tangerine\SystemFiles\Administration\Registration\Pending"
cls
echo Your registration request has been sent. Try back with the password you entered to see if you've been accepted.
echo Press any key to exit...
pause > nul
exit:signout
cls
del "L:\Dancing Tangerine\Status\!user!"
goto login:update
cls
IF exist "L:\Dancing Tangerine\SystemFiles\Update\Update 1" goto yes:no
echo There is no update needed.
pause
goto main:yes
echo Update available!
set /p update=Would you like to update? (y/n)
IF !update!==y goto yesupdate
IF !update!==n goto noupdate:noupdate
cls
echo It is strongly recomended for you to update, are you sure? (y/n)
set /p updatesure=
IF !updatesure!==y goto yesupdate
IF !updatesure!==n goto main
echo Invalid choice, try again...
pause
goto noupdate
pause
cls
goto main:yesupdate
cls
echo Please replace "Dancing Tangerine" on your Flash Drive, with this update.
echo.
echo Dancing Tangerine will now exit.
pause
start iexplore.exe "file:\\\G:\Dancing Tangerine\Update":exit
exitEND OF CODE
We are trying to implement a registration feature into it so that we don't have to add code for every user who wants to join.
Long story short, we need make a batch file to add text to the above batch file in the section with the user info, after "goto login" in ":wrongpass" and before ":colorcheck"... And the section with the passwords between "set /p usrpassword=" and ":wrongpass". The text needed would be in a txt file. There would be five lines that would need to be added to the user info section, and one line needed to be added to the password section. If you need any more info, just tell me.
P.S. I know the code for the registration is a little off. It's not finished.
Babaloomba

You should post this in the "Programming " section. See the entry on the left of this page.
Once I thought I was wrong, now I'm not so sure!

![]() |
IE7 won't open
|
XP Shutdown
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |