Twitter Delicious Facebook Digg Stumbleupon Favorites More

Thursday, January 19, 2012

Programming - Batch Lesson #1



Welcome to your first batch programming lesson! Some people may be skeptical about programming because when they look at a chunk of code it just looks like letter and numbers. Well guess what? That is why I am here to break that code down and explain to you what every little last piece of that code does. Soon enough you will be living and breathing code! (Don't get scared I was just being sarcastic.)

So lets begin shall we?


First lets create a new document. We have to save it as a batch file so the extension for that is name.bat
Here is what your save screen should look like. Make sure you go down and click all files.


@echo off
title My First Program
color 0A
@echo Hello and this is my first program
pause
exit

Ok so now lets talk about what we just did.

We started with @echo off like most batch programs do
We then proceeded to add a title named "My First Program"
we used the "color" command and added the color OA , my favorite color
we then added the text using "@echo
we always have to add pause so are program does not close right away
then we add exit so we can exit the program by clicking any button.

This is not as hard as you thought it would be? Now get back to reading more tutorials!



0 comments:

Post a Comment