I would like to catch escape characters like ctrl+z ctrl+a and so on. When we press these escape combination, the prompt shows ^Z ^A, but when I try to use them as a value to a variable, the code doesn't works.
set /p "input=> "
echo/%input%
The above code shows as output just %input% when I put an escape character, the variable is empty. So, is there a way to catch them? Or this isn't possible?
Set variables as an escape character using set /p?
Moderator: DosItHelp
Re: Set variables as an escape character using set /p?
Have a look at this post by Aacini for an input tool that may help in your situation: viewtopic.php?p=32241#p32241
Re: Set variables as an escape character using set /p?
foxidrive wrote:Have a look at this post by Aacini for an input tool that may help in your situation: viewtopic.php?p=32241#p32241
Thank you Foxidrive, I was looking for a method without third-part software, but GetInput.exe could help me well.
Re: Set variables as an escape character using set /p?
jeb showed me a simple method that I used in my SNAKE.BAT game: viewtopic.php?p=27382#p27382
Dave Benham
Dave Benham