![]() |
Tutorial ★ ☆Devil Child's Batch File Coding Tutorial ★ ☆ - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Hacking (https://sinister.ly/Forum-Hacking) +--- Forum: Tutorials (https://sinister.ly/Forum-Tutorials) +--- Thread: Tutorial ★ ☆Devil Child's Batch File Coding Tutorial ★ ☆ (/Thread-Tutorial-%E2%98%85-%E2%98%86Devil-Child-s-Batch-File-Coding-Tutorial-%E2%98%85-%E2%98%86) |
★ ☆Devil Child's Batch File Coding Tutorial ★ ☆ - Adorapuff - 12-09-2012 ![]() Part One Spoiler: First you are going to want to open up a normal text file in notepad. Then you are going to want to type something like this: ![]() That "Echo" command is the best way to communicate to the person using your batch file. It will display a message on the screen with whatever you typed. Now you can go ahead and save by changing the .txt to a .bat, and making sure it is on "All Files" as the save option: ![]() Now run your batch file, wherever you saved it. Did you see a flash on your screen? That was the batch file coming up and disappearing almost instantly. The reason for this is because there was no command to make it wait for the user to close it. What you are going to need to do is right click on the batch file and click on "Edit": ![]() Now you are going to want to type the word "pause" on the line afterwards, like so: ![]() The command pause waits for the user to press a certain button or use a certain function (in this case, any key on the keyboard). Now you can save it again. Run your batch file again, and it should look something like this: ![]() Oh gosh, another problem? Yes. This time the issue is that the batch program is displaying the directory of where the command is coming from. In my case, it is showing the path to the desktop, where I have the file saved. But there is a very easy fix to this. Open it up using the "Edit" option in the right click menu, and type "@echo off" a line BEFORE the "echo" command line: ![]() This "@echo off" is the SINGLE MOST IMPORTANT COMMAND YOU WILL EVER USE IN A BATCH FILE EVER. Sorry about the all caps, I was just trying to get it through your head that it is the SINGLE MOST IMPORTANT COMMAND YOU WILL EVER USE IN A BATCH FILE EV.. fine, I'll stop now. There is a little more of an in-depth explanation I could give you here, but the easiest way to explain it is that it basically covers up that directory, so that you don't see the actual command being processed, and just the output. Alright, now that I am done explaining that to you, save your batch file and run it: ![]() Success! You have made your first batch file. Doesn't matter at this point how complex it is, because at the end of this tutorial you'll be able to make a complex one yourself. On the next page, I will be talking about making your batch file wait a period of time, and also how to use user input to operate the commands you want. RE: ★ ☆Devil Child's Batch File Coding Tutorial ★ ☆ - Bannedshee - 12-09-2012 Lol devil, you copy catter RE: ★ ☆Devil Child's Batch File Coding Tutorial ★ ☆ - Skill - 12-09-2012 Good tutorial, a lot more detailed then most. I like how you explained it. RE: ★ ☆Devil Child's Batch File Coding Tutorial ★ ☆ - Adorapuff - 12-09-2012 (12-09-2012, 11:05 PM)Cyber-Savage Wrote: Lol devil, you copy catterHow am I a copy cat. RE: ★ ☆Devil Child's Batch File Coding Tutorial ★ ☆ - Anonymous - 12-10-2012 I love seeing these little things. They are always fun to use and send to friends to mess with them a bit.xD RE: ★ ☆Devil Child's Batch File Coding Tutorial ★ ☆ - Merkuri - 12-11-2012 Nice tutorial, but I think that it should be in coding section? |