home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,323 of 68,980   
   Herbert Kleebauer to Tom Del Rosso   
   Re: Keyboard input without pause   
   16 Oct 18 19:42:47   
   
   From: klee@unibwm.de   
      
   On 16.10.2018 16:40, Tom Del Rosso wrote:   
   > I want to break out of a loop without ctrl-c.  Do you know any utility   
   > that can sense keyboard input without pausing?  Any key will do, even   
   > sensing a shift key.  That might work best in fact.   
      
   Start another cmd console:   
      
   @echo off   
   if exist pause.txt del pause.txt   
   start cmd /c pause^&echo.^>pause.txt   
      
   set n=0   
   set m=1   
      
   :loop   
   if not exist pause.txt goto :skip   
   pause   
   del pause.txt   
   start cmd /c pause^&echo.^>pause.txt   
   :skip   
   for /l  %%i in (0,1,%n%) do set /p =.

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca