Simple Batch Coding Course! [2]
by FlareLikesToCode in Circuits > Computers
38 Views, 0 Favorites, 0 Comments
Simple Batch Coding Course! [2]
Hi again! In the last course, we went over all the things that you need to start with. But now, in this course, we're still just getting started. Now, let's stop rambling and get on with the steps!
Commands
For today, our new commands will be the following:
title - Changes the title of the window.
set /p - Makes a variable.
set - Sets a variable.
if ("else" command will be in the next instructable!) - Creates an event trigger (on condition).
Lets go!
Code
Now that we got to know our new commands, let's code! Since, this is meant to teach you, I'll let YOU make one yourself! Here are the command templates:
if %VARIABLE NAME HERE% == VALUE [Insert any command, don't include the brackets lol]
title TEXT
set /p VARIABLE NAME = (Text for user input, optional)
set %VARIABLE NAME% = VALUE
(Always remember to start with @echo off and make sure to add pause at the end!)
Send Me a Pic!
Send a picture in the "I Made It" section! This is optional. I just wanna see your progress!
ok thats it bye memers