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,334 of 68,980   
   Tom Del Rosso to Herbert Kleebauer   
   Re: Keyboard input without pause   
   21 Oct 18 11:47:57   
   
   From: fizzbintuesday@that-google-mail-domain.com   
      
   Herbert Kleebauer wrote:   
   > 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.   
      
   That might work, but it still has a second window on top of the one I   
   want to see.   
      
      
   >> 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.   
      
   Yes, but I updated other utils to the Windows command line.  I could do   
   that one too.   
      
   Your ingenious solution below will suffice in the meantime.  It doesn't   
   look bad with a little child window.   
      
   Thank you.   
      
      
   > @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 =. echo o   
   > set /a n=n+m   
   > if %n%==60 set m=-1   
   > if %n%==0  set m=1   
   >   
   > goto :loop   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

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


(c) 1994,  bbs@darkrealms.ca