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,328 of 68,980   
   Herbert Kleebauer to Tom Del Rosso   
   Re: Keyboard input without pause   
   21 Oct 18 11:32:48   
   
   From: klee@unibwm.de   
      
   On 20.10.2018 22:59, 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.   
      
   > Cute, but I want to exit the loop, not pause it.   
      
   Then instead of "pause" use "goto :eof"   
      
   > And within only a single window.   
      
   Windows is a multi tasking OS, so why not separate this   
   two jobs. But if you want, you can reduce the size of   
   the second window. If it is a slow loop and you can wait   
   1 second, you could use "choice" within the loop.   
      
   > I suppose I have to add another switched option to the   
   > input utility I wrote in 1990.   
      
   The only problem is, that the good old 16 bit helper   
   utilities don't work in Win64 anymore.   
      
   @echo off   
   if exist pause.txt del pause.txt   
   start cmd /c mode con cols=40 lines=1^&color cf^&pause^&echo.^>pause.txt   
      
   set n=0   
   set m=1   
      
   :loop   
   if not exist pause.txt goto :skip   
   del pause.txt   
   goto :eof   
      
   :skip   
   for /l  %%i in (0,1,%n%) do set /p =.

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


(c) 1994,  bbs@darkrealms.ca