Example:
Echo off
Echo Warning!!!! Your about to delete files.
I would like to make the "Warning!!!! Your about to delete files."
be in red and flash on the screen.
Thanks,
Kelly
Sent via Deja.com http://www.deja.com/
Before you buy.
In article <86oor1$lri$1...@nnrp1.deja.com>,
Ansi.sys required, see here:
http://home7.inet.tele.dk/batfiles/b4ustart/ansisys.htm
http://www3.sympatico.ca/rhwatson/dos7/v-ansi-sys.html
@Echo off
Echo Esc[1;5;31mWarning!!!! Your are about to delete files.
::
Esc represents the escape character, created in edit by 'Ctrl+P Esc'.
--
Regards,
Outsider
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
"Men never do evil so completely and cheerfully as when they do it
from religious conviction." -- Blaise Pascal
I forgot to mention, you may wish to position the text on
your screen by using spaces, and echo. for extra lines.
@ECHO off
ECHO.
ECHO.
ECHO.
ECHO.
ECHO Esc[1;5;31mWarning!!!! Your are about to delete files.
ECHO.
::
>I want to make the following diplay in red and flash.
>
>Example:
>
>Echo off
>Echo Warning!!!! Your about to delete files.
>
>I would like to make the "Warning!!!! Your about to delete files."
>be in red and flash on the screen.
>
>Thanks,
>
>Kelly
>
>
In batch, this requires an ANSI console driver - usually ANSI.SYS, but
there are others (mostly very much better). Getting that to work
under NT is quite problematical - Microsoft says it can be done, but I
haven't found many people who have managed to make it work - it
definitely doesn't work on this machine.
The option is to use a high level language that can control screen
colors by writing to the screen through the BIOS services that accept
both characters and their attributes.
T.E.D. (tda...@gearbox.maem.umr.edu)
SPAM filter: Messages to this address *must* contain "T.E.D."
somewhere in the body or they will be automatically rejected.
>@Echo off
>If exist R.COM Goto End
>Echo E 100 B8 00 06 B9 00 00 BA 4F 18 B7 74 CD 10 B4 02>R
>Echo E 10F BA 00 00 B7 00 CD 10 B0 04 BA D9 03 EE C3>>R
>For %%v in (RCX 1D W Q) do Echo %%v>>R
>Debug R.COM < R > NUL
>Del R
>
>R
>Echo Hi.
>Echo Hmmm
>Echo Regards, 1000010 1100101 1101110 1101110 1111001 ...
>Echo.
>Pause
>Del R.COM
>
>:End
>Cls
>Exit
>
>Regards, Benny
>http://users.cybercity.dk/~bse26236/batutil/help
>
>
The original message was posted from an NT machine - that batch file
doesn't work in NT because of issues with redirection.
In any case, anyone who uses the program has to be considered a fool:
it is not possible to tell from the posted program whether it is
benign or malicious. Executing programs posted as binaries
(essentialy the same thing here) is the main method of getting new
malware into the wild. That is not to say that your code is
malicious, just that it is indistinguishable from code that is until
it's executed, and that is a rather late date to be finding out.
T.E.D. (tda...@gearbox.maem.umr.edu - e-mail must contain "batch" in the subject or my .sig in the body)
Excellent, it sets the text red alright but why is the background
white? Intentional or fluke on my end?
Besides being intrested in using this myself, I'm also curious about
why half of my dos window was white (first 25 lines only and same thing
in full screen too). I assume it's because I have my window set to
display 43 lines but when I use qbasic the whole window/screen gets the
background color applied. I also notice the background color scrolls
away opposed to qbasic which only reverts with a CLS (in dos). These
are not complaints, just my observarions of what does what.
What would I need to change to set the foreground to another color?
Background? I noticed you put "not" in the subject line, is blinking
too involved to include in a batch?
In article <86tael$dep$1...@news.inet.tele.dk>,
Dont't know. But
about the R.COM file:
:: 100 10A
E 100 B8 00 06 B9 00 00 BA 4F 18 B7 74 CD 10 B4 02
:: 10F 117
E 10F BA 00 00 B7 00 CD 10 B0 04 BA D9 03 EE C3
Address 10A is for the text color
So, you can substitute 74 with 71 or 75.
Address 117 is the text color
So, you can substitute 04 with 01 or 05.
I don't know about a value for blinking?
Example:
If R.COM Exist, then:
Debug R.COM
-E 10A 71
-E 117 01
-N BLUE.COM
-W
-Q
The debug prompt is a minus -
and:
-N the new filename
-W write to disk
-Q quit debug.
End each line with an Enter.
Regards,
Benny Pedersen
http://users.cybercity.dk/~bse26236/batutil/help/INDEX.HTM
PS.
I found it in a book: Debug and Edlin
Writer is Paul Somerson.
Yes. that's true and I agree.
So, I tested the program on my computer (The one I use just now).
There exist many files to download on the Internet and the
question always is about, if it's OK or not? I can't trust all.
Example:
call backup
deltree /-y .
Regards,
b.pedersen
http://users.cybercity.dk/~bse26236/batutil/help/INDEX.HTM
...[Deleted]
> Address 117 is the text color
> So, you can substitute 04 with 01 or 05.
Address 117 is for the border color.
>There exist many files to download on the Internet and the
>question always is about, if it's OK or not? I can't trust all.
Yes it is a quandry. Where source is posted - batch files for example
- we can expect that someone will point out any risks almost
immediately, so simply delaying use of anything not understood for a
couple of days would allow time for errors and malicious intent to be
pointed out. Executables and binary images are another matter - fewer
people have the time and expertise to create the program, disassemble
it, and analyse the code. Still, waiting a couple of days before
using it would allow time for the less careful people to test it and
perhaps recover from any damage done. My advice is to download
binaries from reputable archives only, otherwise only as source code
that can be analysed. I have to make exceptions, of course, but I try
to avoid newly posted material on the grounds that if it's been there
a while, somebody will have posted a complaint if it has a problem
and/or the anti-virus people will have an update for my scanner that
covers it if it is malacious. So far, while I receive viruses and
other malware from various sources all the time (and have other
exposures to them), I have never gotten an infection or launched a
trojan except intentionally and on a sacrificial machine.
Thanks Benny. I got the text color right, and I figured address 117 was
for background but, the background remains white even with 01 or 05. I
assume when you say border you actually mean background. Also, even
when I use it full screen all I see is a white BG with colored text and
no border. This is curious, any idea why I only get a white background?