home *** CD-ROM | disk | FTP | other *** search
- echo off
- cls
- Echo TMES DEMO #2
- Echo ....for the still curious - remember this is a batch file!
- Echo ....and also remember there's no errorlevel checking here!
- Echo.
- :: start a counter=1, for it to iterate to 6 before quitting
- ::
- TMES COUNT 1
- ::
- Echo You will be entering 5 items...
- ::------------------------------------------------------
- :TOP_OF_LOOP
- Echo Please Enter Item #%COUNT% now and press ENTER
- ::
- :: allows input for A(%COUNT%)
- TMES A(%COUNT%) /input
- ::
- :: increments the COUNT by +1
- TMES COUNT /inc
- ::
- :: asks if the count is 6 yet?
- TMES COUNT /eq 6 ANSWER
- ::
- if '%ANSWER%' == '0' goto TOP_OF_LOOP
- ::
- :: ----bottom of loop-----------------------------------
- ::
- Echo Please ENTER a number in your "big" range of 1 to 5 (ie like maybe 2 ?)
- TMES X /input
- Echo.
- if 'A(1)'=='A(%X%)' echo What you input for #%X% was "%A(1)%"
- if 'A(2)'=='A(%X%)' echo What you input for #%X% was "%A(2)%"
- if 'A(3)'=='A(%X%)' echo What you input for #%X% was "%A(3)%"
- if 'A(4)'=='A(%X%)' echo What you input for #%X% was "%A(4)%"
- if 'A(5)'=='A(%X%)' echo What you input for #%X% was "%A(5)%"
- Echo.
- Echo Enjoy TMES. If you make any neat BATCH file send them to me for
- Echo inclusion in the next version of TMES. If I use your example, I will
- Echo send you the next version free and write you a postcard to let you
- Echo know that you qualified. Thanks. Remember, it's got to be good!
- Echo.
- Echo P.S.
- Echo I will erase the environment variables for you. If you want to look
- Echo at them however, just CONTROL-C now and do a SET for a peek at them.
- pause
- TMES /del X COUNT ANSWER A(1) A(2) A(3) A(4) A(5)
-
-
-