Use con-e.bat (listed below). Then you can execute
con-e XXX
and environment variable XXX will get set to whatever the user types
in until the Enter key is typed.
@echo off %con-e.bat%
if (%1)==() goto 900
type ZLF.tmp >ZLF.tmp
echo @echo off>enter.bat
echo if (%%1)==() goto 900>>enter.bat
echo shift>>enter.bat
echo shift>>enter.bat
echo shift>>enter.bat
echo shift>>enter.bat
echo set %1=%%1>>enter.bat
echo shift>>enter.bat
echo :100>>enter.bat
echo if (%%1)==() goto 999>>enter.bat
echo set %1=%%%1%% %%1>>enter.bat
echo shift>>enter.bat
echo goto 100>>enter.bat
echo :900>>enter.bat
fc con ZLF.tmp /lb1 /n | date | find " 1: ">>enter.bat
echo :999>>enter.bat
call enter.bat
del enter.bat
del ZLF.tmp
goto 999
:900
echo usage: con-e envvar
echo sets the specified environment variable to input from console
echo example:
echo con-e XXX
echo will capture whatever the user enters into environment var XXX
:999
- Larry Weiss
Any reasonable answer to that depends on what you mean by "capture"
and "keystrokes" - knowledge of the operating system could be critical
as well.
"Capture" could mean "discard", "save", "save multiples in a string",
or "identify", and "keystrokes" without modification means any of the
100+ keys on the any keyboard ever built, many of which are
non-printing and very difficult to deal with without a special built
program in a high-level language.
A precise statement of the problem is needed.
T.E.D. (tda...@gearbox.maem.umr.edu - e-mail must contain "batch" in the subject or my .sig in the body)
Download here: http://members.aol.com/bretjohn/programs/scncd590.zip
"Rana Mehmood" <rmeh...@prodigy.net> wrote in message
news:en8K4.7708$fF5.3...@news1.rdc1.il.home.com...