Instant Messenger For LAN in batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Mason
Posts: 4
Joined: 28 Jan 2009 18:02
Location: 3 Ethical Hackers dot com
Contact:

Instant Messenger For LAN in batch

#1 Post by Mason » 02 Feb 2009 20:41

@ECHO OFF
TITLE Messanger
COLOR 0A
CD /D C:\
IF EXIST C:\Messanger GOTO :A
IF NOT EXIST C:\Messanger MD Messanger

:A
CD /D C:\Messanger
CLS
ECHO Welcome to Windows Family Messanger.
ECHO Created and Coded by Evan M. Barry of Hidden Panda Inc.
ECHO;
ECHO;
PAUSE
ECHO;
ECHO;
ECHO 1) New User
ECHO 2) Existing User
ECHO 3) Exit
set /p n=Please choose one of the above:
IF %n%==1 GOTO :B
IF %n%==2 GOTO :c
IF %n%==3 EXIT

:B
CLS
ECHO;
ECHO;
ECHO You have chosen New user.
ECHO This means you have not used this program before, or a previous account of yours has been deleted.
PAUSE
CLS
ECHO;
ECHO;
ECHO Firstly, Choose your new Username...
SET /p u=Username:
MD %u%

:W
CLS
ECHO;
ECHO;
ECHO Welcome to the Windows Family Messanger
ECHO You Have chosen your personal username as %u%
PAUSE
CLS
ECHO;
ECHO;
ECHO You will now be redirected to your Account Menu
GOTO :D

:E
CLS
ECHO;
ECHO;
ECHO The Username you have entered is not available.
ECHO You will Be redirected to the main menu
PAUSE
GOTO :A

:C
CLS
ECHO;
ECHO;
SET /p u=Username:
IF EXIST C:\Messanger\%u% GOTO :D
IF NOT EXIST C:\Messanger\%u% GOTO :E

:D
CLS
CD /D C:\Messanger\%u%
ECHO;
ECHO;
ECHO Welcome %u%
ECHO;
ECHO This is your Personal Account Menu
PAUSE

:X
ECHO;
ECHO;
ECHO What would you like to do?
ECHO;
ECHO;
ECHO 1) Check Inbox
ECHO 2) Compose Message
ECHO 3) Exit
SET /P o=Your Option:
IF %o%==1 GOTO :In
IF %o%==2 GOTO :co
IF %o%==3 EXIT

:In
CLS
TITLE %u%'s Inbox
CD /D C:\Messanger\%u%
IF NOT EXIST inbox.txt ECHO No New Messages
IF EXIST inbox.txt GOTO :O
GOTO :X

:O
CLS
inbox.txt
DEL inbox.txt
GOTO :X


:Co
CLS
TITLE Compose Message
ECHO;
ECHO;
ECHO List of Users
DIR C:\Messanger
set /p r=Recipient from list above:
CLS
set /p m=Message:
ECHO $%u%$ says %m% >>C:\Messanger\%r%\inbox.txt
ECHO;
ECHO;
ECHO Message Sent

Post Reply