|You seen like an expert coder, but I am not.|
I'm not trying to be mean or anything, I'm just pointing out some of the problems
that jumped out at me, and noted some things where you might think about when
when dealing with user error types of conditions.
I still have a problem with the 'keyword' detection. I was trying your code, and it
kept closing the window.
The keyword detection is suppose to detect anywhere in the sentence. Right
now, the keyword has to be alone. If I ask a question, the window closes.
It looks like you missed one. Please stop defining token_counter=1 and then try to
use %tokenvalue% in it's place in this FOR /F loop:
echo Would you like to ask a question?
SET /p udefine= -
SET /A token_counter=1
if %udefine%==yes goto :ask
if %udefine%==no goto :main
for /f "tokens=%tokenvalue% delims= " %%a in ("%udefine%") do if "%%a" equ "" (goto :eof) else (call :%%a %%a)
set /a tokenvalue+=1
I am sure you are getting an error message along the lines of: " delims= " was unexpected
at this time, due to %tokenvalue% not being defined, and the interpreter not knowing what
to do next...
Insomniac at large