Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Here's the code:
@echo off setlocal enabledelayedexpansion set skip=f for /f %%a in (key.txt) do ( for %%b in ("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z") do ( if "!skip!"=="f" ( if "!%%~b!"=="" set %%~b=%%a && set skip=t ) ) set skip=f ) set/p test=Text to Encode: for %%a in ("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z") do ( set test=!test:%%~a=!%%~a!! ) echo %test% pausekey.txt is a text file that has 1-26, on 26 lines
(1st line=1 2nd line=2 etc.)
This program assigns the number an the first line to variable a then the next line to b, etc. This portion works fine. But when I try to replace letters that you type in with numbers, instead of replacing it the out put is the letters a-z. No clue why...I would appreciate some help. Thanks.
There are no stupid questions, just stupid people.

set test=!test:%%~a=!%%~a!!
I'm not sure what this produces, but chances are it isn't what you intended.(It's parsed as [set test=] [!test:%%~a=!] [%%~a] [!!])

![]() |
pseudo code
|
C++ compiling error
|
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |