IIRC it was called ask.com and I used it in batch files to
solicit parameters for an upcoming command similar to the way
%1 %2 etc work.
Anyone know where I can get it (or similar)?
--
Len
______________________________________________________
remove nothing for valid email address.
>Not the right ng, I know, but I figured some of you old timers
>might remember an old utility that I can't lay my hands on.
>
>IIRC it was called ask.com and I used it in batch files to
>solicit parameters for an upcoming command similar to the way
>%1 %2 etc work.
>
>Anyone know where I can get it (or similar)?
Don't know about 'ask'.
I know about:
BE-Batch Enhancer, Advanced Edition 4.50, (C) Copr 1987-88, Peter
Norton
BE command [parameters]
or
BE filespec
Commands available:
ASK
BEEP
BOX
CLS
DELAY
PRINTCHAR
ROWCOL
SA
WINDOW
For more help on a specific command type:
BE command ?
and (some longer lines wrapped)
C:\>what
WHAT - Batch file enhancer
Command Purpose Argument Environ Exit
Extended
--------- ------- -------- ------- ---- ------
C[E] ["prompt"] [chars] Get Allowable Character Character
Echo
character characters
S[E] ["prompt"] Get string None String Length Echo
D[E] Check DOS None Major (Major*10)
Minor
version +Minor
version
E[E] Get environ None Bytes Bytes/10 10
bytes
bytes left bytes in
exit
F[E] filespec Get file Filespec Kilobytes Ks/10Ks
10Ks in
size (255=directory) exit
K[E] [driveletter] Get disk Drive Kilobytes Ks/10Ks
10Ks in
space exit
M[E] Check None Kilobytes Ks/10Ks
10Ks in
memory exit
P Check for None 1=yes,0=no 1=yes,0=no
None
printer
V [number] Get/Set New mode Current or Current or
None
video mode last mode last mode
7 Check for None 1=yes,0=no 1=yes,0=no
None
coprocessor
A Check for None 1=yes,0=no 1=yes,0=no
None
ANSI driver
Y[E] Get current None Directory Level/Drive
Drive
directory
--
ArarghMail912 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html
To reply by email, remove the extra stuff from the reply address.
> Not the right ng, I know, but I figured some of you old timers
> might remember an old utility that I can't lay my hands on.
>
> IIRC it was called ask.com and I used it in batch files to
> solicit parameters for an upcoming command similar to the way
> %1 %2 etc work.
>
> Anyone know where I can get it (or similar)?
I don't know what you intend to do with it. But whatever your intention,
it might be very tedious to get a specialized util for every step of
your batch.
I suggest you take a look at 4DOS, which is a very powerful replacement
for your DOS command.com. It offers a plethora of new commands,
variables and functions, among them INKEY and INPUT for user
interaction. You'll probably won't need any other app.
4DOS was once a commercial program. by JP Software (www.jpsoft.com),
where the original freeware version 7.50 can still be downlaoded. Now it
has been developed fiurther and its latest version 8.00 can be found at
http://4dos7.extra.hu/download.php
or on my site
http://www.4dos.info/4dvers/4dos800.zip
--
Best Regards,
* Klaus Meinhard *
<www.4dos.info>
If so, you need something like the set /p command used in Win XP.
Where : set /p pauses the batch script and displays a prompt-string and waits for
user input.
This input can then be used in the rest of the script.
The DOS equivalent that I found, is called ANSWER.COM and can be downloaded by
clicking on the link below :
http://www.4shared.com/file/165074879/5205a6ef/ANSWER.html
It works by, as I said, waiting for user-input and setting an environment variable
called ANSWER with the text the user typed. You can then transpose the ANSWER
variable to another [variable] so that you may use it several times in one script.
I hope this IS the sort of thing that you wanted.
You can use [answer.com] for example, as in the script below :
@echo off
echo.
echo.
echo Enter your First Name...
ANSWER FirstName=
set FIRSTNAME=%answer%
if "%firstname%"=="" goto FAIL1
set ANSWER=
echo.
echo.
echo Enter your Last Name...
ANSWER LastName=
set LASTNAME=%answer%
if "%lastname%"=="" goto FAIL2
set ANSWER=
echo.
echo.
echo Enter your Middle Name (if you have one)...
echo (or just press [ENTER])
ANSWER MiddleName=
set MIDNME=%answer%
if "%midname"" goto CONTINUE
:CONTINUE
set ANSWER=
echo.
echo Hello, your name is: %firstname% %midname% %lastname%.
echo.
goto end
:FAIL1
echo.
echo You didn't enter anything!
echo.
goto end
:FAIL2
echo.
echo You didn't enter a last name?!
echo.
:end
set FIRSTNAME=
set LASTNAME=
set MIDNAME=
==
Cheers, Tim Meddick, Peckham, London. :-)
".Len B" <gone...@internode0.on0.net> wrote in message
news:%231R7Vj9...@TK2MSFTNGP05.phx.gbl...
I've downloaded it. Now I'll read the docs. Thanks.
The reason I'm looking is that I've just written a simple batch
file that requires a single parameter each time it is run. That
one parameter is then used as an argument in two later lines.
I created a desktop shortcut to the batch file but then realized
that I couldn't pass it any parameters that way. I have to run it
from a command prompt. That's when I remembered ask.com which I
could have inserted in the file earlier than when the parameter
was required and I would be prompted at run time for the parameter.
I couldn't find it anywhere and Google came up with a multitude of
hits about www.ask.com which swamped any real hits.
--
Len
That takes me back. I used to use NU all the time years ago but I
can't find it now. I don't remember using BE but I probably did.
I hadn't heard of What before.
Thanks
I'll download answer.com and try it.
I've used set often but I didn't know it now has the inbuilt evaluator
etc.
Always learning, eh?
--
Len
______________________________________________________
remove nothing for valid email address.
"Tim Meddick" <timme...@gawab.com> wrote in message
news:O10lnNId...@TK2MSFTNGP06.phx.gbl...
The [set] command has two added switches under XP - the [/a] and the [/p]
switches that provide arithmetaic and user interactive input support respectively.
Do type :
set /?
...for a [very] detailed explanation of how to use them.
The util : [Answer.com] is really only for use with pure DOS environments and works
just as well as [set /p] and does a similar job.
Although you cannot define the variable-name (you are stuck with the variable
"answer") but requires you to perform the intermediate step of transposing the
"answer" variable to another before deleting the "answer" variable and then are free
to start the process again.
If the ASK parameter of BE.EXE will suffice for your user input (i.e where the input
is a simple one-key affair) then you are better off with [CHOICE.COM] which is
available in ALL versions of windows and works in a batch file like in the example
below. Type [choice /?] at a DOS or CMD.EXE prompt for help on syntax.
@echo off
echo.
echo Start program with which start options?
echo.
echo Type A to start with /auto parameter
echo Type B to start with /basic parameter
echo Type C to start with /choices parameter
echo.
choice /c:abc Start with parameter
if ERRORLEVEL 3 goto SWITCH_C
if ERRORLEVEL 2 goto SWITCH_B
if ERRORLEVEL 1 goto SWITCH_A
:SWITCH_C
myprogram.exe /choices
goto end
:SWITCH_B
myprogram.exe /basic
goto end
:SWITCH_A
myprogram.exe /auto
end
==
Cheers, Tim Meddick, Peckham, London. :-)
".Len B" <gone...@internode0.on0.net> wrote in message
news:%23NVvvEJ...@TK2MSFTNGP05.phx.gbl...
I had considered using Choice but I felt >50 choices was too much and
they weren't static choices either. They are user names. Maintenance
would have been worse than just running it from the command prompt.
--
Len
______________________________________________________
remove nothing for valid email address.
"Tim Meddick" <timme...@gawab.com> wrote in message
news:erDMIZJd...@TK2MSFTNGP06.phx.gbl...
Just glad to be [some] help.
==
Cheers, Tim Meddick, Peckham, London. :-)
".Len B" <gone...@internode0.on0.net> wrote in message
news:eSVoCAKd...@TK2MSFTNGP05.phx.gbl...
This link posted in another thread:
http://www.4shared.com/file/162222178/4f37e2df/NU45A.html
>
>I hadn't heard of What before.
I have no idea where I got it. There is no clue as to who wrote it,
within. I have a very vague memory of it having come with some
programs install, maybe microsoft.
Thanks for the link. I'll do a bit of reminiscing.
<snip>
>Thanks for the link. I'll do a bit of reminiscing.
I still use that version of NU with some regularity.