home *** CD-ROM | disk | FTP | other *** search
- let %!a = %1
- if %!a# = # goto ERROR
- let %!z = %!a
- gt %!z 24
- if errorlevel 1 goto ERROR
- if %!a = 0 Let %!a = 5
- goto TEST1
- :TEST1
- let %!b = %2
- if %!b# = # goto ERROR
- let %!z = %!b
- gt %!z 65
- if errorlevel 1 goto ERROR
- if %!b = 0 Let %!b = 1
- goto TEST2
- :TEST2
- let %!c = %3
- if %!c# = # GOSUB TEST2B
- goto TEST3
- :TEST2B
- let %!c = DIR
- return
- :TEST3
- let %!d = %4
- if %!d# = # GOSUB TEST3B
- goto SETUP
- :TEST3B
- let %!d = Input---\\62\\62
- return
- :SETUP
- let %!e = %!d
- GOTO ACT
- :ACT
- let %!f = *.*
- locate %!a %!b
- echonolf %!e\\32
- read %!f
- let %!z = %!f
- string_length %!z
- lt %!z 2
- if errorlevel 1 goto ACT
- COMMAND /C %!c %!f
- goto END
- :ACT
- !%!f
- :SYNTAX
- echo.
- echo SYNTAX---: AT [ROW(1-24)] [COLUMN(1-65)] [Command] [1word_prompt]
- echo USAGE----: Use in .BAT programs to interreact with users. Optional
- echo prompt is positioned at given row/column coordinates.
- echo If user inputs anything less than 2 characters, prompt
- echo line is repeated at same coordinates.
- echo.
- echo EXAMPLE--: AT 10 15 DIR Filespec?
- echo EXAMPLE--: AT 20 5 CD\ Name·of·Directory?:
- echo ^no spaces allowed^
- echo.
- echo Note: AT uses the COMMAND \C option to run the optional [command].
- echo [ROW] & [COLUMN] must be defined, [Command] defaults to DIR,
- echo and [1word_prompt] defaults to Input---\\62\\62
- !echo The prompt word accepts \\# where # is any value from 1 to 255
- !echo Example: Enter\\32a\\32Valid\\32Filespec----\\62\\62\62
- echo Hint: RENAME AT.EXE @.EXE
- echo.
- echo Freeware, copyright 1990, by Felix A. Rozewicz
- goto END
- :ERROR
- echo Unable to verify validity of first 2 primary parameters.
- beep
- echo.
- waitkey 2
- goto SYNTAX
- :END
- EXIT