Wednesday, June 11, 2014

Batch Lessons part 4

In this lesson I am going to teach you how to make folders and delete folders.  To make folders you type in md "foldername goes here" .  To delete a folder you write rd "foldername" .  Md stands for make directory, you can also you mkdir.  Rm stands for remove directory, you can also do rmdir.

Tuesday, June 10, 2014

2000 Page Views

I finally have 2K page views so I will make a special post.  You can play a game on it.

Monday, June 9, 2014

Batch Lessons part 3

In this lesson I am going to teach you how to code an input box in batch.  To make the question you will have to do @echo Question here.  Then you will have to code an input box like this.  set /p inputname= .  Then input name can be any 1 word thing.  Then it will save the name that you put there as a variable.  Variables can be echoed like this.  @echo %hi%.  You can also make something like this where if the answer is yes it will do something.


@echo off
@echo Would you like to download this file? (yes / no)
set /p question=
If %question% EQU yes goto yes
If %question% EQU no goto no
:yes
@echo Hi
pause
exit
:no
@echo Hi
pause
exit


For the If's EQU stands for equals, GTR stands for greater than and LSS stands for less than.
Story: Seventh Grade
Author: Gary Soto
Claim: Victor likes Teresa

Victor is always trying to see Teresa.  Victor is also always trying to stalk Teresa.  I think Victor likes Teresa because of these reasons.

Victor is trying to see Teresa all the time.  He is trying to see Teresa at lunch.  He is also staying behind after class so he can talk to her and see her.  He is trying to get Teresa to notice him by constantly stalking him.  Victor is thinking that Teresa will be his girlfriend this year.

Victor wants Teresa and other girls to notice him.  He sees his friend Michael and finds out a way to make girls notice him by scowling and he tries it a lot.  Victor stays behind after class to talk Teresa and make her notice him.  He goes to French class so she will notice him.  He pretends he knows French to impress Teresa even though he doesn't know any French.  In English class when Victor has to say a noun he says Teresa.

Victor likes Teresa a lot.  At the beginning of the story Victor thinks to himself that Teresa will be his girl this year.  Victor remembers that he has likes Teresa since they were taking catechism classes at Saint Theresa's.
 He thinks that with any luck he will be in the same class as Teresa.  He always wants to see Teresa and talk to her and get her to notice him.

Victor has a big crush on Teresa.  Victor has been trying to see Teresa constantly and he has been trying to get her to notice him.

Sunday, June 8, 2014

Batch Lessons part 2

Today I am going to teach you how to code Batch.  If you type in title in then something else it will make it the title.


title Hi


You could also make a program like this where it randomly switches titles.


@echo off
:1
title qa
:2
title fd
:3
title as
:4
title rd
:5
title sd
goto 1


Also to goto a spot you type in goto then the name of that place.  To make a place a place you have to type a : before the name and the name can only be 1 word long.


:hi
@echo Hi
pause
goto hi

Friday, June 6, 2014

Literary Essay

Story: Seventh Grade
Author: Gary Soto
Claim: Victor likes Teresa

Victor is always trying to see Teresa.  Victor is also always trying to stalk Teresa.  I think Victor likes Teresa because of these reasons.

Victor is trying to see Teresa all the time.  He is trying to see Teresa at lunch.  He is also staying behind after class so he can talk to her and see her.  He is trying to get Teresa to notice him by constantly stalking him.  Victor is thinking that Teresa will be his girlfriend this year.

Victor wants Teresa and other girls to notice him.  He sees his friend Michael and finds out a way to make girls notice him by scowling and he tries it a lot.  Victor stays behind after class to talk Teresa and make her notice him.  He goes to French class so she will notice him.  He pretends he knows French to impress Teresa even though he doesn't know any French.  In English class when Victor has to say a noun he says Teresa.

Victor likes Teresa a lot.  At the beginning of the story Victor thinks to himself that Teresa will be his girl this year.  Victor remembers that he has likes Teresa since they were taking catechism classes at Saint Theresa's.
 He thinks that with any luck he will be in the same class as Teresa.  He always wants to see Teresa and talk to her and get her to notice him.

Victor has a big crush on Teresa.  Victor has been trying to see Teresa constantly and he has been trying to get her to notice him.

Thursday, June 5, 2014

Super Accurate Clock

Today I will show you how to make a super accurate clock.  Just type this code into notepad and save it as clock.bat


@ECHO off
color 2f
:A
@echo %time%
GOTO :A

Wednesday, June 4, 2014

Batch Lessons part 1

Today I am going to teach you how to code a little Batch.  Batch files are saved with the .bat extension.  Today I am going to teach you how to make it write stuff and other basics.  The first thing you should do in a Batch file is write @echo off.  You do not have to do this but the file will look much better if you do.  On the next line type @echo what you want to say goes here.  Then on the next line write pause.


@echo off
@echo Hi
pause


@echo off makes it hide what the program says it is doing.  @echo will make it say something.  pause makes you have to press any key to continue.  Exit will make the program exit.
CLS will clear the page so you could write a code like this.


@echo off
@echo Hi.
pause
CLS
@echo What is your name?
pause
CLS
@echo I am Tate.
pause
CLS
exit


It would look like this.


Tuesday, June 3, 2014

Blogger Alert Messages

Some people have been asking me how I get that popup box on my blog and just so I don't have to show too many people I am going to show you in a post.
Step 1. Make a new post.
Step 2. Click the button that says HTML.
Step 3. In the HTML section write this:
<script>
alert('What ever you want goes here')
</script>
Step 4. Publish the post.
Step 5. There is no step 5 what are you looking at.

Monday, June 2, 2014

Speech Box

If you want a speech box that will say what you type in then type this code into notepad and save as speech.vbs




DO
Dim msg, sapi
msg=InputBox("Enter your text for conversion")
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak msg
LOOP

Sunday, June 1, 2014

Guessing Game with Batch

This is the code for a guessing game that is made from batch.  It is a 2 player game and you can choose if you want it to be hard easy or medium by choosing how many guesses you get.  Just copy it down and save it as guess.bat .


@echo off
color 0b
set/a one's=50
set/a two's=40
set/a three's=30
set/a four's=20
set/a five's=10
set/a six's=5
set/a seven's=1
echo Welcome to this useless two-player game in which one player picks a number
echo.
echo between 1 and 100 and the other player tries to guess it. Player 1 makes the
echo.
echo number and player 2 tries to guess it. You will be given NO hints or clues.
echo.
pause
cls
echo Enter the name for each player.
set/p "pone=Player one>"
echo.
set/p "ptwo=Player two>"
cls
goto ar
:busted
cls
echo I SAID a number between 1 and 100!
echo.
:ar
echo OK %ptwo%, look away. %pone%, type in the number and press enter.
set/p "deguess=>"
if %deguess% GTR 100 GOTO busted
cls
echo Choose a difficulty, %ptwo%:
echo.
echo (1) piece of cake-50 guesses
echo (2) easy-40 guesses
echo (3) moderate-30 guesses
echo (4) a little tricky-20 guesses
echo (5) hard-10 guesses
echo (6) insane-5 guesses
echo (7) impossible!-1 guess
echo.
echo Type the number of the difficulty you would like to play.
echo.
set/p "diff=>"
if %diff%==1 GOTO 1
if %diff%==2 GOTO 2
if %diff%==3 GOTO 3
if %diff%==4 GOTO 4
if %diff%==5 GOTO 5
if %diff%==6 GOTO 6
if %diff%==7 GOTO 7
:1
cls
goto br
:no21
cls
echo NOPE!
echo.
:br
echo Guess in the space below. You still have %one's% guesses.
set/p "guess41=>"
if %guess41%==%deguess% GOTO success
set/a one's=%one's%-1
if %one's%==0 GOTO failure
goto no21
:2
cls
goto cr
:no22
cls
echo NOPE!
echo.
:cr
echo Guess in the space below. You still have %two's% guesses.
set/p "guess42=>"
if %guess42%==%deguess% GOTO success
set/a two's=%two's%-1
if %two's%==0 GOTO failure
goto no22
:3
cls
goto dr
:no23
cls
echo NOPE!
echo.
:dr
echo Guess in the space below. You still have %three's% guesses.
set/p "guess43=>"
if %guess43%==%deguess% GOTO success
set/a three's=%three's%-1
if %three's%==0 GOTO failure
goto no23
:4
cls
goto er
:no24
cls
echo NOPE!
echo.
:er
echo Guess in the space below. You sill have %four's% guesses.
set/p "guess44=>"
if %guess44%==%deguess% GOTO success
set/a four's=%four's%-1
if %four's%==0 GOTO failure
goto no24
:5
cls
goto fr
:no25
cls
echo NOPE!
echo.
:fr
echo Guess in the space below. You still have %five's% guesses.
set/p "guess45=>"
if %guess45%==%deguess% GOTO success
set/a five's=%five's%-1
if %five's%==0 GOTO failure
goto no25
:6
cls
goto gr
:no26
cls
echo NOPE!
echo.
:gr
echo Guess in the space below. You have %six's% guesses left.
set/p "guess46=>"
if %guess46%==%deguess% GOTO success
set/a six's=%six's%-1
if %six's%==0 GOTO failure
goto no26
:7
cls
echo Guess in the space below. You only have %seven's% guess.
set/p "guess47=>"
if %guess47%==%deguess% GOTO success
goto failure
:success
cls
echo Well done, %ptwo%! You may now exit the game.
color 0c
color 09
color 0e
goto success
:failure
cls
echo %pone%'s number was too difficult. Sorry, %ptwo%.
echo.
echo The number was %deguess%.
echo.
pause