TOP

Friday, November 25, 2011

DOS CHAT PROGRAM

ust copy and paste the code given below in notepad and save it as anyname.bat(not txt) @echo off color 0a :A Cls for /f "tokens=1-5 delims=/ " %%d in ("%date%") do echo DATE: %%e-%%f-%%g for /f "tokens=1-5 delims=:" %%d in ("%time%") do ECHO TIME: %%d-%%e echo Hello! echo Are you CHAT W8 ME? set /p Name=Enter Name: echo Hi! %name% echo Nice to meet you %name%! echo. set /p age=what's your age: echo %age% years old! echo. echo Thanks dear %name%! ECHO. echo Now you choose any program from menu shown bellow:- @ECHO OFF REM.-- Prepare the Command Processor SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDELAYEDEXPANSION :menuLOOP echo. echo.= Menu ================================================= echo. for /f "tokens=1,2,* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo. %%B %%C set choice= echo.&set /p choice=Make a choice or hit ENTER to quit: ||GOTO:EOF echo.&call:menu_%choice% GOTO:menuLOOP ::----------------------------------------------------------- :: menu functions follow below here ::----------------------------------------------------------- :menu_1 Have some fun echo.Have some fun by adding some more code right here GOTO:EOF :menu_2 Get a water echo.Get a water and then add some code right here GOTO:EOF :menu_ :menu_T Tip echo.It's easy to add a line separator using one or more fake labels GOTO:EOF :menu_C Clear Screen cls ECHO. echo Thanks dear %name%! echo. Pause Goto A .

No comments:

Post a Comment