Thread Rating:
  • 7 Vote(s) - 3.71 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coding Batch
#1
Batch is a very simple computer code that can solve simple algorithms and execute simple commands it is very similar to DOS and is text-based
i will go through some basic commands and what they do, and then show you how they are used in a code
PROGRAMS
the are no real programs for batch you could use the notepad and save the file as a .bat
OR
you could use a programming software called notepad++
http://notepad-plus-plus.org/
Virustotal:
https://www.virustotal.com/en/file/39b17.../analysis/


COMMANDS
@Echo off
Prevents commands from show up. needed at the start of every code


cls
just means "CLEAR SCREEN" clears all text off screen


echo 
shows text on screen if a period is put at the end of echo a blank spot will take the place of text
I.E
    @Echo off
     cls
     color b
     echo.
     echo Hey!
    pause 


Pause
pause means to pause the code when you put pause in at the end of a code line a message prompt will apear saying "press any key to continue" when you press any key the program will shut down


color 
just means the color of the background or text some simple color codes are a (green), b (blue), c (red), d (purple), e (yellow)
you can also do a1,a2,a3 etc. but the are much more advanced. go to CMD and type in color a, b,c etc. and experiment 


exit 
quits out of the program


set /p a=
sating user input can be put here a in the command can be switch out with any thing
like car bus train anything can be put in place of a WARNING if you have multiple set/p commands in you code the can not all have a i has to be diffrent


if %a% == 1
if satements are saying IF the user imputs this key (in this case 1) do this command in most cases the command goto or exit is after the if statement
WARNING use this command after set /p also since i used a for my set command i will use a in %% so %a%
I.E
    @Echo off
     cls
     color a
     echo press one to go to start
     echo press two to exit
     set /p a=
     if %a% == 1 goto start
     if %a% == 2 exit 
     :start
     cls
     echo hi
     pause


goto and code blocks
the command goto means to go to a command block. command blocks are :(words)

so if i named my code block :kek before this new code block to go to it i would need the command goto kek
WARNING between code blocks put a space
I.E
    :topkek
     cls
     color d
     goto kek


     :kek
     cls
     color c
     echo senpai will notice me today
     pause


Del and start 
Del as alot of you know means delete 

I.E
    del sys32
start means to open a .exe file 
I.E
    start Chrome.exe


thats the basics see if you guys can make a quiz game out of these commands if you get stuck just reply to this post or pm me
╚═( ͡° ͜ʖ ͡°)═╝
╚═(███)═╝
╚═(███)═╝

.╚═(███)═╝

..╚═(███)═╝

…╚═(███)═╝

…╚═(███)═╝
..╚═(███)═╝

.╚═(███)═╝

╚═(███)═╝
.╚═(███)═╝
..╚═(███)═╝





    
Reply
#2
nice and easy tutorial! would help a few people!
Ban reason: Encoraging a kids suicide swatting people etcetcetc (Permanent)
Reply
#3
never said thanks for this but thanks
Reply
#4
thanks thanks thanks thanks
Reply
#5
(10-03-2016, 11:14 PM)Liam Wrote:  thanks thanks thanks thanks

who r u
Reply
#6
Grave digging get b&
Reply
#7
me
(10-03-2016, 11:15 PM)Oblivion Wrote:  
(10-03-2016, 11:14 PM)Liam Wrote:  thanks thanks thanks thanks

who r u

(10-03-2016, 11:15 PM)Oblivion Wrote:  
(10-03-2016, 11:14 PM)Liam Wrote:  thanks thanks thanks thanks

who r u

me
Reply
#8
Very simple but good for begginers.Thanks
Reply
#9
nice and easy tutorial. thanks
Reply
#10
More threads like this, this was helpful.
Reply
#11
nice tutorial, thanks a lot.
Reply
#12
It's not the best but, it's still helpful.
Reply
 


Possibly Related Threads...
Thread Author Replies Views Last Post
  Tracking coding tutorials somenewton 0 97 11 hours ago
Last Post: somenewton
  wsh coding gipollma 1 179 06-19-2018, 06:37 AM
Last Post: SusanAnthony
  for java advance coding pm me hax0rf1r3 1 221 03-30-2018, 06:14 AM
Last Post: sleepy99
  is it possible to learn coding fast? itsmynew 45 5,276 03-26-2018, 01:52 AM
Last Post: jacksu
  coding skill sleepy99 0 248 03-05-2018, 06:49 PM
Last Post: sleepy99



Users browsing this thread: 1 Guest(s)