[Código-Batch] Consola de Comandos Versión Arcoiris - JaAViEr

Iniciado por JaAViEr, Julio 17, 2011, 05:29:39 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Julio 17, 2011, 05:29:39 AM Ultima modificación: Febrero 22, 2015, 09:33:42 PM por Expermicid
Esta se la traigo solo a CPH (como casi todos mis codes):
Código: text

@echo off
cls
Mode Con cols=80 lines=25
fclr 14 "Consola de Comandos - "
fclr 12 "JaAViEr "
fclr 10 "Version [3.0]"
echo.
echo.
title Simbolos del Sistema - JaAViEr.
if not exist "keyboard.exe" ( goto :key ) else ( goto :menX )
:menX
echo.
if exist teclas.txt ( del /Q /F "teclas.txt" )
set "stringle=0"
fclr 12 "$ "
goto :continua
:continua
set/a "r=%random% %% 15"
keyboard
if %errorlevel% EQU 8 (
if %stringle% EQU 0 goto :continua
set /a stringle=%stringle%-1
<nul set /p "= " &goto :continua
)
if %errorlevel% EQU 49 (fclr %r% 1 &set /a stringle=%stringle%+1 &<nul set /p "=1" >> teclas.txt &goto :continua)
if %errorlevel% EQU 50 (fclr %r% 2 &set /a stringle=%stringle%+1 &<nul set /p "=2" >> teclas.txt &goto :continua)
if %errorlevel% EQU 51 (fclr %r% 3 &set /a stringle=%stringle%+1 &<nul set /p "=3" >> teclas.txt &goto :continua)
if %errorlevel% EQU 52 (fclr %r% 4 &set /a stringle=%stringle%+1 &<nul set /p "=4" >> teclas.txt&goto :continua)
if %errorlevel% EQU 53 (fclr %r% 5 &set /a stringle=%stringle%+1 &<nul set /p "=5" >> teclas.txt&goto :continua)
if %errorlevel% EQU 54 (fclr %r% 6 &set /a stringle=%stringle%+1 &<nul set /p "=6" >> teclas.txt&goto :continua)
if %errorlevel% EQU 55 (fclr %r% 7 &set /a stringle=%stringle%+1 &<nul set /p "=7" >> teclas.txt&goto :continua)
if %errorlevel% EQU 56 (fclr %r% 8 &set /a stringle=%stringle%+1 &<nul set /p "=8" >> teclas.txt&goto :continua)
if %errorlevel% EQU 57 (fclr %r% 9 &set /a stringle=%stringle%+1 &<nul set /p "=9" >> teclas.txt&goto :continua)
if %errorlevel% EQU 48 (fclr %r% 0 &set /a stringle=%stringle%+1 &<nul set /p "=0" >> teclas.txt&goto :continua)
if %errorlevel% EQU 97 (fclr %r% a &set /a stringle=%stringle%+1 &<nul set /p "=a" >> teclas.txt&goto :continua)
if %errorlevel% EQU 98 (fclr %r% b &set /a stringle=%stringle%+1 &<nul set /p "=b" >> teclas.txt&goto :continua)
if %errorlevel% EQU 99 (fclr %r% c &set /a stringle=%stringle%+1 &<nul set /p "=c" >> teclas.txt&goto :continua)
if %errorlevel% EQU 100 (fclr %r% d &set /a stringle=%stringle%+1 &<nul set /p "=d" >> teclas.txt&goto :continua)
if %errorlevel% EQU 101 (fclr %r% e &set /a stringle=%stringle%+1 &<nul set /p "=e" >> teclas.txt&goto :continua)
if %errorlevel% EQU 102 (fclr %r% f &set /a stringle=%stringle%+1 &<nul set /p "=f" >> teclas.txt&goto :continua)
if %errorlevel% EQU 103 (fclr %r% g &set /a stringle=%stringle%+1 &<nul set /p "=g" >> teclas.txt&goto :continua)
if %errorlevel% EQU 104 (fclr %r% h &set /a stringle=%stringle%+1 &<nul set /p "=h" >> teclas.txt&goto :continua)
if %errorlevel% EQU 105 (fclr %r% i &set /a stringle=%stringle%+1 &<nul set /p "=i" >> teclas.txt&goto :continua)
if %errorlevel% EQU 106 (fclr %r% j &set /a stringle=%stringle%+1 &<nul set /p "=j" >> teclas.txt&goto :continua)
if %errorlevel% EQU 107 (fclr %r% k &set /a stringle=%stringle%+1 &<nul set /p "=k" >> teclas.txt&goto :continua)
if %errorlevel% EQU 108 (fclr %r% l &set /a stringle=%stringle%+1 &<nul set /p "=l" >> teclas.txt&goto :continua)
if %errorlevel% EQU 109 (fclr %r% m &set /a stringle=%stringle%+1 &<nul set /p "=m" >> teclas.txt&goto :continua)
if %errorlevel% EQU 110 (fclr %r% n &set /a stringle=%stringle%+1 &<nul set /p "=n" >> teclas.txt&goto :continua)
if %errorlevel% EQU 111 (fclr %r% o &set /a stringle=%stringle%+1 &<nul set /p "=o" >> teclas.txt&goto :continua)
if %errorlevel% EQU 112 (fclr %r% p &set /a stringle=%stringle%+1 &<nul set /p "=p" >> teclas.txt&goto :continua)
if %errorlevel% EQU 113 (fclr %r% q &set /a stringle=%stringle%+1 &<nul set /p "=q" >> teclas.txt&goto :continua)
if %errorlevel% EQU 114 (fclr %r% r &set /a stringle=%stringle%+1 &<nul set /p "=r" >> teclas.txt&goto :continua)
if %errorlevel% EQU 115 (fclr %r% s &set /a stringle=%stringle%+1 &<nul set /p "=s" >> teclas.txt&goto :continua)
if %errorlevel% EQU 116 (fclr %r% t &set /a stringle=%stringle%+1 &<nul set /p "=t" >> teclas.txt&goto :continua)
if %errorlevel% EQU 117 (fclr %r% u &set /a stringle=%stringle%+1 &<nul set /p "=u" >> teclas.txt&goto :continua)
if %errorlevel% EQU 118 (fclr %r% v &set /a stringle=%stringle%+1 &<nul set /p "=v" >> teclas.txt&goto :continua)
if %errorlevel% EQU 119 (fclr %r% w &set /a stringle=%stringle%+1 &<nul set /p "=w" >> teclas.txt&goto :continua)
if %errorlevel% EQU 120 (fclr %r% x &set /a stringle=%stringle%+1 &<nul set /p "=x" >> teclas.txt&goto :continua)
if %errorlevel% EQU 121 (fclr %r% y &set /a stringle=%stringle%+1 &<nul set /p "=y" >> teclas.txt&goto :continua)
if %errorlevel% EQU 122 (fclr %r% z &set /a stringle=%stringle%+1 &<nul set /p "=z" >> teclas.txt&goto :continua)
if %errorlevel% EQU 27 (exit /b)
if %errorlevel% EQU 13 (
if not exist "teclas.txt" (goto:continua)
echo. &call :FORX &echo. &&goto :menX)
if %errorlevel%==32 (<nul set /p "= " &call :space)
fclr %r% %L1%"
goto:continua
:FORX
FOR /F "tokens=*" %%A IN ('type teclas.txt') DO (
IF %%A==help (
FOR /F "tokens=2" %%E IN (teclas.txt) DO (
echo %%E
)
)
IF %%A==salir (fclr 13 "Salida"
exit)
IF %%A==cread (call :titls)
IF %%A==ayuda (
fclr 7 "Comandos "&fclr 12 "Disponibles"
echo.
echo.creadir : Crear Directorio.
echo.crdt : Creditos.
echo.limpia : Limpiar pantalla.
echo.dires : Listar directorios.
echo.go : Entrar en directorio.
echo.vars : Declaracion de variables.
goto:menX
)
IF %%A==limpia (cls&goto:menX)
IF %%A==go (fclr 11 "COMANDO go EN CONSTRUCCION"&echo. &goto:menX)
IF %%A==vars (fclr 11 "COMANDO vars EN CONTRUCCION"&echo.&goto:menX)
IF %%A==creadir (fclr 11 "COMANDO creadir EN CONSTRUCCION"&echo. &goto:menX)
IF %%A==crdt (fclr 13 "Autor: JaAViEr"&echo.&goto:menX)
IF %%A==dires (dir /p
echo.
fclr 11 "Listado Correctamente"&echo. &goto:menX)else (fclr 11 "Error, comando no encontrado"&echo. &goto:menX)

)
:titls
FOR /F "tokens=2,*" %%B IN ('type teclas.txt') DO (
mkdir "%%B %%C"
fclr 11 "Directorio creado correctamente."
)
goto :eof
:space
Set "L1= "
<nul set /p "= " >> teclas.txt
set /a stringle=%stringle%+1
Goto:Eof
:key
(
echo n keyboard.dat
echo e 0000 4D 5A 2E 00 01 00 00 00 02 00 00 10 FF FF F0 FF
echo e 0010 FE FF 00 00 00 01 F0 FF 1C 00 00 00 00 00 00 00
echo e 0020 B4 08 CD 21 3C 00 75 02 CD 21 B4 4C CD 21
echo rcx
echo 002E
echo w0
echo q
echo.
)>keyboard.dat
type keyboard.dat|debug>NUL 2>&1
del /f/q/a "keyboard.exe">NUL 2>&1
ren keyboard.dat "keyboard.exe" >nul
echo. Reinicie el script.
Goto :Eof

Hice algunas mejoras como la escritura arcoiris(de varios colores)
y si no ingresamos nada y das enter, no te deja, debes ingresar algo.
Simplemente no da el enter a noser que ingreses lo qe sea.

Saludos.
You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login