⚡To start off, type
this code is basically saying that you want your program to display something.
⚡The next code on a new line is
The " : " means that you have a specific point you want to return to. I then typed "start" to specify a name for this point. You can use whatever you want, i only used "start" for the sake of simplicity.
⚡ More code
This code is just a shortened version of the words "Clear Screen". And that is what it does. Later on we will find that clearing the screen makes the program run smoother and visually attractive.
⚡ Codes, codes, codes
The code "echo" tells the program to prompt whatever follows on that line.
The %time% just means to display the time that the computer has.
⚡ [Insert funny one-liner here]
Whoever made this programming language honestly just put the words "go" and "to" together and made it go to a specified point. In this case, I made it go back to "start". Don't Pass Go. Don't Collect 200.
⚡ Saving a program from Notepad is different from saving a text document. There are a few step you must take for it to work correctly.
1. Where it says "Save as type", choose the option "All Files".
2. Save your program as Clock.bat . The ".bat" tells the computer what programming language you used
Choose a safe place to save this and hit save.
You have now officially written a program. Now if you open it you may notice that it looks a little sketchy, but no worries. These next few steps will show you how to amp up your program.
⚡Lets add some color to our project. Add the command
to a new line under "@echo off". "0a" Is just a color code for light green text on a black background. You can use any color combination you want, but 0a is the most stereotypical color scheme for a hacker.
⚡If you opened the program then you would have noticed that it flashed each time at you. I found this to be distracting and ugly, so I added the command:
timeout 0 /nobreak>null
This is a more advanced command, so I won't explain it all to you. It basically tell the program to wait for "0" seconds and then continue without letting the user know it paused. If you look up the "timeout command", you can learn more.
⚡Almost done. Add the command:
on the first line, on its own line.(Reference the picture above). This just make the name of window that will open "Clock".
And now you're Done.
When you open it now it should look a lot nicer and more appealing. I simply shrunk mine down to a reasonable size.
This was the first program I ever wrote when I was first starting out (Not as advanced obviously) and still enjoy the look of it. I hope to have inspired all of you to carry on with writing programs, but if not, at least you have a new clock.
Have a good day while never having to worry about what time it is ever again.