Checking a condition from a list of variables?
Posted: 11 Nov 2011 12:18
This is part of a code I'm writing.
I want the condition to activate with %check% being set to A12, A34, A21, A09, and A19.
Is there any way to do this without coding several lines?
Code: Select all
choice /c wdsa /n>nul&set A%V1%%V2%=_
if %errorlevel%==1 set /a V1=%V1%-1
if %errorlevel%==2 set /a V2=%V2%+1
if %errorlevel%==3 set /a V1=%V1%+1
if %errorlevel%==4 set /a V2=%V2%-1
set target=A%V2%%V1%
if %target%==%check% echo invalid&goto grid
I want the condition to activate with %check% being set to A12, A34, A21, A09, and A19.
Is there any way to do this without coding several lines?