• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Sign in to follow this  
Followers 0
HØLLØW

Blinking text in batch-file

20 posts in this topic

Hi guys out there,

can anyone tell me if it's possible to make a text blinking in a batch-file?

I read a few sites about that but I thinks it's very complex to do that?!

Is there a 3rd-party tool to do this? I always usie "EchoX" to make colored text, but it has no functionality to make blinking text :huh:

Is it also possible to clear just one line in a ECHO-command in batch?

With CLS I always clear the whole screen...

Thank you

Edited by HØLLØW
0

Share this post


Link to post
Share on other sites

I'm thinking maybe going back to BASIC... If you can get QBASIC from Windows 95 (or 98?) you build scripts to do things like this. I also remember making cmdline/DOS programs like this that was able to run programs, display different info, and make text blink. Unfortunately I lost my old DOS and QBASIC books in a flood I had about a year ago, so only the internet is left. Here is a site that talks about using flashing text in QBASIC:

http://www.qbcafe.net/qbc/english/misc/tutorials/beginner/starting-qbasic-2.html

0

Share this post


Link to post
Share on other sites

Depends what type of OS you're using.

In MS-DOS 6/7/8 [6.22 is last stand-alone DOS based OS from MS; MS-DOS 7.00, 7.10 + 8.00 are part of Windows 95, 98 + ME, respectively] it is possible to have blinking text, using an ANSI device driver [pre-loaded in memory from CONFIG.SYS or AUTOEXEC.BAT], like ANSI.SYS included with all MS-DOS 6/7/8 [Win95/98/ME] releases, or 3rd party ANSI.COM [free].

ANSI allows full spectrum of 16 VGA colors, blinking, layouts, custom prompts, etc... in real/native DOS mode [outside Windows GUI], but a lil more restricted (no blinking) under Win9x GUI DOS box/session/window.

But if you're using any WinNTx based OSes [NT4, 2000, XP, 2003, Vista, 2008 or 7], you're out of luck, because the DOS console is merely a virtual machine, not the "real" DOS mode.

And Microsoft disabled completely [mainly for security + compatibility reasons] the access to real mode hardware resources.

Therefore in NTx OSes there is no text blinking in DOS [DOS is available only as a window/session/box/console = VM (Virtual Machine)], nor keyboard shortcuts for that matter. And the ANSI functions are implicitly disabled [although the obsolete file ansi.sys is still found in %windir%\system32], since there is no "real" DOS mode.

EchoX uses same functions as DOS VM to display colors.

There might be a tiny possibility...

1. find a 3rd party NT-compatible DOS tool/device [?] which allows limited access to hardware resources in DOS VMs [console];

2. try to learn how to tweak MS PowerShell [free add-on in XP/2003/Vista/2008 and native in Win7]:

http://www.mdgx.com/xptoy.htm#PWS

Tweaking PowerShell to display blinking text is probably a long shot, but I have no experience using it.

Good luck.

BTW:

Basic/Qbasic also uses ANSI functions to change colors and blink. Therefore most of those functions will be disabled in NTx OSes.

Although I haven't tried runnig Qbasic programs from DOSBox [free GPL]: ;)

http://www.dosbox.com/

HTH

0

Share this post


Link to post
Share on other sites

The blinking is supported in "pure" DOS and In "full screen" mode only with ANSI, AFAICR:

http://www.robvanderwoude.com/ansi.php

Another possibility may be using a bash cmdline shell for NT, original bash does have blinking text supported. :unsure:

Check this one:

http://www.claus-juergen-claussen.de/htmls/xewc_e.html

it may have a similar effect to what you are looking for.

jaclaz

0

Share this post


Link to post
Share on other sites

BTW:

Basic/Qbasic also uses ANSI functions to change colors and blink. Therefore most of those functions will be disabled in NTx OSes.

Although I haven't tried runnig Qbasic programs from DOSBox [free GPL]: ;)

http://www.dosbox.com/

HTH

I still have some old software that was written in Q/BASIC or one of its derivatives. I have found that these old programs only run in Dosbox. For example, one of them I know is written in BASIC (based on the file headers of the EXEs) if ran in XP from double-click or command prompt will spike the CPU to 100% and not open. In DOSbox, it uses maybe 2% of CPU. It may have something to do with your other comments. I need to figure out myself how DOSBox works better, because this specific app I am using (which has blinking text btw) is abandonware and I wanted to update it. Only way I can find is a hex editor, unless you know of any BASIC decompilers. I can provide specific BASIC compiler info if needed.

0

Share this post


Link to post
Share on other sites

easy

you can change blue text.

title HAXCOM

:ST4RT

color a

@echo off

title HAXCOM

cls

echo Your Text Here

goto ST4RT

and special animation

title HAXCOM

color a

@echo off

title HAXCOM

cls

ping localhost -n 2 >nul

echo Your Text Here

ping localhost -n 2 >nul

echo second text here

pause

0

Share this post


Link to post
Share on other sites

easy

you can change blue text.

Perfect. :thumbup

OP:

Is it also possible to clear just one line in a ECHO-command in batch?

With CLS I always clear the whole screen...

What you are suggesting is NOT about having blinking text, but rather about cyclically clear and re-display the whole console text area.

jaclaz

0

Share this post


Link to post
Share on other sites

and it's an old thread as well, I know everybody can get caught :rolleyes: but DataCracker is like looking for them. :D

0

Share this post


Link to post
Share on other sites

Now it's been reborn, I thought the attatchment may be interesting.

Blink.zip

0

Share this post


Link to post
Share on other sites

That is very easy here is the code

title G7 NanoHax

color a

@echo off

title G7 NanoHax

cls

:123

cls

echo YOUR TEXT HERE

goto 123

then save as NameMe.bat and as 'All Files'

you can download a example i made down there called 'Blinkin' Text.zip' it's in zip cause it didn't allow .bat there is .exe version too. there is no malware virus spyware adware rootkits or anything malicious

Blinkin\' Text.zip

0

Share this post


Link to post
Share on other sites

easy

you can change blue text.

Perfect. :thumbup

OP:

Is it also possible to clear just one line in a ECHO-command in batch?

With CLS I always clear the whole screen...

What you are suggesting is NOT about having blinking text, but rather about cyclically clear and re-display the whole console text area.

jaclaz

No you cant have cls command on one line sorry.

0

Share this post


Link to post
Share on other sites

and it's an old thread as well, I know everybody can get caught :rolleyes: but DataCracker is like looking for them. :D

What do you mean what is DataCracker7899 looking for?

0

Share this post


Link to post
Share on other sites

That is very easy here is the code

Interesting you managed to worsen your own code, posted only a couple posts before:

by removing the ping loop.

And AGAIN that has NOTHING to do with "blinking" text, it is all about endless looping the CLS and ECHO commands. :realmad:

jaclaz

0

Share this post


Link to post
Share on other sites

yeah but the text will blink so so what jaclaz

No, the text won't "blink" THE WHOLE page will disappear (CLS) and then re-appear (ECHO) (and thus ALL the text on the page will appear to blink).

If you had actually READ the OP question it is about "managing" SINGLE lines and NOT the whole screen and he actually excluded in his post the use of CLS.

So you posted TWICE the same thing, BOTH times answering *another thing* from what was originally asked.

Check this page:

http://www.robvanderwoude.com/ansi.php

(already provided) if you scroll a bit down it you will see an example of ANSI <Esc>[5m under DOS.

jaclaz

0

Share this post


Link to post
Share on other sites

The dos blinking isn't cleaning the window and rewrite it entirely and that's what wanted the OP in recent windows and this was already clearly explained 3 years ago.

Edit: Jaclaz already answered more precisely.

Edited by allen2
0

Share this post


Link to post
Share on other sites

Did anyone actually take a look at the example I provided?

it provided a method of changing text on a line without clearing the screen

0

Share this post


Link to post
Share on other sites

Indeed your code is a better approach of a replacement of the dos blinking escape code but it is still far too complex to be used easily in any script.

0

Share this post


Link to post
Share on other sites

It's not terribly difficult, allen2. Of course it will only work on the last output line. And, as written, only for a limited amount of time.

Clever way to get a carriage return, BTW. ;)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.