• Welcome to Test Foro de elhacker.net SMF 2.1.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - zennyt28

#1
Scripting / batch agenda
31 August 2012, 04:06 AM
Ola foreros me presento soy nuevo mi nick es zennyt28 y vengo a dejar un code que hize hace tiempo espero que os guste.


@echo off
title agenda zennyt
setlocal enabledelayedexpansion

:menu
cls
echo:
echo:    ^| MENU ^|
echo:
echo: 1. Ver Agenda
echo: 2. Agregar Tarea
echo: 3. Salir
echo:
set "op="
set/p "op=>> "
if not defined op (goto:menu)
if ["%op%"]==["1"] (goto:Show)
if ["%op%"]==["2"] (goto:Add)
if ["%op%"]==["3"] (exit)
goto:menu

:Show
cls
for /f "tokens=*" %%x in (%~0) do (
set "line=%%x"
if ["!line:~0,10!"]==["::AGENDA::"] (
set "line=!line:~10!"
echo:
echo:!line!
)
)
echo:
pause
goto:menu

:Add
cls
set "fecha="
set/p "fecha=- Fecha (dd/mm/aaaa): "
if not defined fecha (goto:Add)
echo:
set "tarea="
set/p "tarea=- Tarea: "
if not defined tarea (goto:Add)
for %%y in ("fecha","tarea") do (
for %%z in ("^","&","<",">","|") do (set "%%~y=!%%~y:%%~z=^%%~z!")
)
echo:::AGENDA::%fecha% - %tarea% >> %~0
goto:menu


su descarga: Enlace eliminado por el moderador..