Simple, I think re-writing Command.Com should work. *hint*
BTW, the correct sequence is "| / - \"!
--
Don't feel bad about asking/telling me anything, I will always gladly
reply.
Wish you a lot of theta brain-waves!!
GTSC4 -- If nobody else wants to do it, why shouldn't we?(TM)
Meson & GTSC4 are now merged:
Http://WWW.MesonAI.Com
I think the full sequence is like this.
| / - \ | / -
--
<!-Outsider//->
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Communicator 4.08
"The right to be let alone is indeed the beginning of all freedom."
>Paul Silver wrote:
>> Please can someone tell me how to make the curosor spin in DOS, i
>> think it uses the | - / - \ symbols to make it look like its spinning
>> around on the spot ...
>> thanks
>
Well, here is a simple function in Pascal, that i use for years: (i
don't know if the characters in set 2 and 5 make it properly through
windows)
Const SpinnerChars : Array [1..5] of String [4] =
( '-\|/', { 1 }
#30#17#31#16, { 2 }
'كقـف', { 3 }
'\/\/', { 4 }
'ْùغ' { 5 }
);
{---------------------------------------------------------------------------}
Function SpinChar (Forward : Boolean;
SpinnerSet : Byte;
LastChar : Char) : Char;
Var LastState : Byte;
begin
LastState := Pos (LastChar, SpinnerChars [SpinnerSet]);
if LastState = 0 then LastState := 5;
if Forward
then LastState := Succ (LastState AND 3)
else begin
Dec (LastState);
if LastState = 0 then LastState := 4;
end;
SpinChar := SpinnerChars [SpinnerSet, LastState];
end; { SpinChar }
Ralf
I think if you have ever seen that effect it was under 4DOS. I
remember some batches from way back that achieved a spinning cursor
for the command line.
--
Viele Grüße, best regards,
*Klaus Meinhard*
07°36´57" East 53°07´52" North
Author of the 4XBTM batch collection at http://www.4xbtm.de
"Paul Silver" <web...@eurolinkglobal.com> wrote in message
news:45a0754c.01080...@posting.google.com...
It can be done in MS-DOS batch for any process that can be isolated,
and individualized such as copying muliple files, etc.
Most likely, you should repost your inquiry in alt.msdos.batch;
however, if you haven't got an answer, here's what little I
know of the subject:
Altho you say "cursor spin" you obviously know that the cursor
isn't spinning... it is the presentation on the screen of the
symbols listed above, and others. I'm not sure what the first
symbol (|) is, but it is most likely a pipe and DOS will
probably not accept its use. So be prepared to use the letter
I or the like.
The spin is relatively easy to achieve, as is its placement on
the screen. The process requires the loading of ANSI.SYS or an
equivalent. The next requirement is a text editor which is
capable of creating ESCape sequences. Lastly, put it together
in a batchfile using a FOR loop:
@echo off
FOR %%a in ( I / - \ I / etc. etc) do echo Esc [12;40H%%a
~Repititions~
Echo Esc [12;40[sp]
The "Esc" represents the Escape code symbol. In the For loop
the Escape code moves the cursor to screen position line #12
column #40 (sorta in the middle of the screen). The use in the
last line is to erase the last symbol printed on the screen. I
positioned the cursor where the screen printing took place and
printed a space. (You may have to experiment with this aspect).
The position of the spinning symbols can take place anywhere
on the screen; you set the position with Escape code sequence
of: [line[nn];Col[nn]H.
You will also have to experiment with the number of times the
symbol sequence appears in a single line; then the number of
repititions of this line so the spinning lasts as long as you
want. And then there is experimentation with the sysbols that
make up a single sequence of symbols. Try (I I - - \ \ I I etc.,)
and other variations. The need to experiment is the fact that
the speed at which the symbols are printed result in different
perceptions of what is seen.
Lastly, the cursor will be present during the spinning... unless
you have or obtain a utility which will hide the cursor. Somewhere
in my travels I picked up a small utility named CSR which does
that. I suppose there are many others at Simtel and the like.
Just invoke it before the FOR loops to hide the cursor, and again
afterwards to restore the cursor. You probably could get a close
approximation with the use of ESCape codes but that seems tedious.
Lots of luck!
Tom
> Most likely, you should repost your inquiry in alt.msdos.batch;
> however, if you haven't got an answer, here's what little I
> know of the subject:
comp.os.msdos.4dos might be more appropriate <g>.
In the meantime I have dug out the 4DOS batch I referred to in my
earlier post. It gives a spinning cursor at the prompt while waiting
for input.
In effect, it creates a simple loop, putting the "spin characters" on
the screen, looks for input, and repeats. If there´s input, it handles
the command line to the command processor for execution. The batch was
written about 96 by Phi Nguyen.
Could be, but I think the OP implied that he was using M$DOS.
> In the meantime I have dug out the 4DOS batch I referred to in my
> earlier post. It gives a spinning cursor at the prompt while waiting
> for input.
>
> In effect, it creates a simple loop, putting the "spin characters" on
> the screen, looks for input, and repeats. If there愀 input, it handles
> the command line to the command processor for execution. The batch was
> written about 96 by Phi Nguyen.
I find that interesting. What happens when a non-internal command is
input at the command prompt?
But, getting back to the question posed by the original poster, and
assuming that he _does_ have 4DOS, what would you advise him to do to
solve his "problem" without resorting to the use of employing someone
else's work?
Alternatively, what suggestion/s might you have for him, using M$DOS?
I'm sure my construct using a FOR loop is not unique in any way, nor
the best construct.
Thanks.
> I find that interesting. What happens when a non-internal command is
> input at the command prompt?
the same that happens on the command line: the command processor takes
a look, sees it´t not an internal command and invokes the external....
> But, getting back to the question posed by the original poster, and
> assuming that he _does_ have 4DOS, what would you advise him to do
to
> solve his "problem" without resorting to the use of employing
someone
> else's work?
> Alternatively, what suggestion/s might you have for him, using
M$DOS?
> I'm sure my construct using a FOR loop is not unique in any way, nor
> the best construct.
I get the feeling you are a bit miffed. I didn´t want to detract from
your solution (which I didn´t test). I just had the feeling the
original poster might have seen his spinning cursor under 4DOS,
because it was a hot topic there (ca 1995/6), while I don´t remember a
batch solution using pure DOS. If you´d like to see the original
nguyen batch, I´m prepared to post it here.
I don´t quite understand what you mean by "without resorting to the
use of employing someone else's work": the original poster is seeking
help by someone else? Or do you mean what solution I myself might
produce? Off the cuff something using
set prompt=%@exec[....
from 4DOS Help:
@EXEC[[@]command]: Execute the command. The command can be an alias,
internal command, external command, .BTM file, .BAT file, .CMD file.
@EXEC is primarily intended for running a program from within the
PROMPT.
I have absolutely no suggestion using plain, even MS, DOS.
OK. See if I understand you: You invoke the spinning cursor and it
will spin indefinitely, and during the time that it is spinning it
will accept an external command to execute a text editor, then when
the editor is exited the spinning cursor resume. Am I right on all
points? If not, where did I go off track?
> > But, getting back to the question posed by the original poster, and
> > assuming that he _does_ have 4DOS, what would you advise him to do
> to
> > solve his "problem" without resorting to the use of employing
> someone
> > else's work?
>
> > Alternatively, what suggestion/s might you have for him, using
> M$DOS?
> > I'm sure my construct using a FOR loop is not unique in any way, nor
> > the best construct.
>
> I get the feeling you are a bit miffed.
Sorry. I didn't mean to convey such. I wasn't miffed then nor am I now.
I can't even think of a reason for being miffed.
>I didn愒 want to detract from
> your solution (which I didn愒 test). I just had the feeling the
> original poster might have seen his spinning cursor under 4DOS,
You're probably right... particularly if he really meant "cursor."
I've seen some spinning done in DOS but my recollection is that they
were decorative in nature only. ie: While files were being unzipped
and/or copied to somewhere a "spinner" kept one amused during the
several seconds which elapsed. Obviously, we're talking about machines
of the 1980's. However, the original poster submitted his question
in an MSDOS NG so I think is is reasonable he was referencing MSDOS,
not some other DOS.
> because it was a hot topic there (ca 1995/6),
I don't dispute that in the least, but I don't have any recollection
of the matter being discussed.
> batch solution using pure DOS.
If we are looking for a spinning cursor which will process commands,
my question is: Is there a _batch_ solution in DOS? If we are merely
looking for a spinner, then one can follow my suggestion of using a
FOR loop. Remember, I pointed out that the cursor would be there with
the spinner, unless a utility was employed to hide it.
> If you悲 like to see the original
> nguyen batch, I惴 prepared to post it here.
I don't think it would serve any purpose since this is not a 4DOS NG.
> I don愒 quite understand what you mean by "without resorting to the
> use of employing someone else's work": the original poster is seeking
> help by someone else? Or do you mean what solution I myself might
> produce? Off the cuff something using
I meant a solution not employing the nguyen batch.
> set prompt=%@exec[....
>
> from 4DOS Help:
>
> @EXEC[[@]command]: Execute the command. The command can be an alias,
> internal command, external command, .BTM file, .BAT file, .CMD file.
>
> @EXEC is primarily intended for running a program from within the
> PROMPT.
>
> I have absolutely no suggestion using plain, even MS, DOS.
Thanks for trying. You certainly have pointed up how MSDOS often lacks
capabilities that other DOS's have.
Cheers.
tom
> OK. See if I understand you: You invoke the spinning cursor and it
> will spin indefinitely, and during the time that it is spinning it
> will accept an external command to execute a text editor, then when
> the editor is exited the spinning cursor resume. Am I right on all
> points? If not, where did I go off track?
Yes, you are right. All you need to do in a _real_ loop (DO ... ENDDO)
is to put the spin chars on the screen and look as often as you wish
for a character waiting in the buffer. If found, you can then branch
to an input line, receive the command and let the CP (second shell?)
execute it and return control back to the batch . I imagine this is
possible in plain DOS with GOTO and using some externals. Of course,
this might make the spin erratic and/or slow.
> You're probably right... particularly if he really meant "cursor."
> I've seen some spinning done in DOS but my recollection is that they
> were decorative in nature only. ie: While files were being unzipped
> and/or copied to somewhere a "spinner" kept one amused during the
> several seconds which elapsed. Obviously, we're talking about
machines
> of the 1980's. However, the original poster submitted his question
> in an MSDOS NG so I think is is reasonable he was referencing MSDOS,
> not some other DOS.
Understandable. But I´ve often seen posters who weren´t aware that
they were asking about 4DOS matters. They had seen something on a
system and asked how it could be done in DOS, when what they´de seen
was 4DOS.
> Thanks for trying. You certainly have pointed up how MSDOS often
lacks
> capabilities that other DOS's have.
That´s right. And I am not sorry for it.
The basic premise here (spinning cursor) is a good example. You can
describe in simple words what is needed step by step (see above), so
you should be able to code it in any appropriate language. You cannot
do so in plain command.com batch, because essential language elements
are missing. If you were really set on this, you´d now go hunting for
externals, try to cobble something together using insufficient flow
control structures, and end up with something ugly after a couple of
hours/days.
Now imagine a batch language where everything is at hand, extensive
help just a F1 away, and you´d probably be done with the job in under
one hour even if your new at this (knowledge of general programming
assumed here).
Now ask yourself how much you value your time (be it private or
business time).