Starting to Code a Batch Code RPG

by ItzMynow in Circuits > Software

2654 Views, 23 Favorites, 0 Comments

Starting to Code a Batch Code RPG

Batch.png

This instructable will teach you how to start coding in batch!

How to Make a Batch File

Simply to make a batch file open notepad or notepad ++ (https://notepad-plus-plus.org) . Once you have opened one of these notepads you'll need to hit file, then save as, you can save your document anywhere. But before you save it click save as type then all files. Then you must save the document as SOMETHING.bat (SOMETHING is your choice)

Setting Up Your Code

Since you have saved your document we can now start writing our code. On the first line i recommend typing @echo off , what this does is if you type in echo hello world it will basically show the code. (Echo will be explained.) On the second line type TITLE Title Name , again Title Name can be any word or group of words

Categories

To make a category in batch code, you will type :Word (Word being any word.) Then if you write 'echo.' On the line it will skip a line. Then if you write echo Hello World the code will display Hello World.

CLS

Now that you know what echo is we can start introducing more vocabulary. A feature called 'cls' clears the screen existing so after every category write cls so basically

:new

cls

echo Hello World!

Tips, Tricks, Hints.

TIP 1:

While coding make sure to have each line of code on a different line. For Example:

:Hello

cls

echo.

echo Hello World

Notice how each line of code is on its own line.

TIP 2:

Make sure to not be frustrated if your code isn't working, maybe you just need a little break. Or you may need to tweak some of your code lines.

Real Batch Code Example (By, Me!)

This Code, Is Not Done... Files In Image Section.