title: Windows set command
body: <p>I've been playing around with the <code>set /p</code> and the <code>if</code> commands,
  but I can't figure out how to automatically let it press enter
  when I type 1. Here is my code:</p>
  
  <pre><code>@echo off
  echo 1. hello
  echo 2. bye
  set /p choice=Type 1 or 2. 
  if %choice%==1 goto hello
  if %choice%==2 goto bye
  :hello
  echo hello
  pause
  exit
  :bye
  echo bye
  pause
  exit
  </code></pre>
  
  <p>What I'm trying to do is enable my script to detect if I have pressed 1 or 2, without having to press enter. </p>
  
  <p>I got the idea from an RPG batch game that also used that and I couldn't figure out where or how it was written, it was a very complex game with a lot of calls... </p>
  
  <p>But please help me, I'm also trying to build an RPG with a friend of mine who is also fooling around with batch!</p>