home bbs files messages ]

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

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

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

   Message 40,954 of 42,547   
   foxidrive to remy.javelle@gmail.com   
   Re: How to input arrow keys or space bar   
   02 May 14 20:13:16   
   
   From: foxidrive@server.invalid   
      
   On 2/05/2014 19:29, remy.javelle@gmail.com wrote:   
   > I'm using the code based on William Allen code (his line 5 is the problem) :   
   >   
   > IF (GOTO:)==(%1) %1%2 (Subroutine Handler)   
   >   :: Make a tiny program to get Keyboard input   
   >   %COMSPEC%/c %0 GOTO: _INSCR ECHO. %TEMP%.\_IN.COM|debug>NUL   
   >   
   > :CHOOSEMODE   
   >   
   >   :: Get a character   
   >   %TEMP%.\_IN.COM>NUL   
   >   SET KEY=   
   >   IF %ERRORLEVEL% EQU == 13 SET KEY=Enter   
   >   IF %ERRORLEVEL% EQU == 72 SET KEY=Up   
   >   IF %ERRORLEVEL% EQU == 80 SET KEY=Down   
   >   IF ()==(%KEY%) GOTO ALREADYINSTALLED   
   >   if %KEY% == Enter GOTO CHOSEN   
   >   if %KEY% == Down GOTO ALREADYINSTALLED   
   >   if %KEY% == Up GOTO ALREADYINSTALLED   
   >   GOTO ALREADYINSTALLED   
   >   :CHOSEN   
   >   if %MODE% == 1 GOTO BASICMODE   
   >   if %MODE% == 2 GOTO ADVANCEDMODE   
   >   
   >   GOTO EOF   
   >   :NOTARROW   
   >   ECHO. Non Arrow-Key pressed, finished.   
   >   DEL %TEMP%.\_IN.COM   
   >   SET KEY=   
   >   
   >   GOTO EOF (=Subroutine section below=)   
   >   :_INSCR (Usage: %COMSPEC%/c %0 GOTO: _INSCR ECHO. WorkFile)   
   >   %3a100            % Start Assembly %   
   >   %3mov ah,1        % Character Input subfunction %   
   >   %3int 21          % Get input into register AL %   
   >   %3mov ah,4c       % Exit to OS with ERRORLEVEL=AL subfunction %   
   >   %3int 21          % Do the Exit %   
   >   %3   
   >   :: Build the above program   
   >   FOR %%C IN (rcx 8 n%4 w q) DO %3%%C   
   >   
   >   GOTO EOF   
   >   :_INSTRUCTIONS (for using the script)   
   >   ECHO. Syntax: %0 ParameterList   
   >   ECHO. ParameterDescription   
   >   
      
      
   The whole thing is based around the machine code _in.com and that won't work   
   in a 64 bit machine.   
      
   --- 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