Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Blinking text in batch-file

- - - - -

  • Please log in to reply
19 replies to this topic

#1
HØLLØW

HØLLØW

    Member

  • Member
  • PipPip
  • 138 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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, 14 February 2010 - 04:55 PM.

Mit freundlichen Grüßen / Kind regards / Salutations distinguées / Atentamente / Distinti saluti

HØLLØW


How to remove advertisement from MSFN

#2
HØLLØW

HØLLØW

    Member

  • Member
  • PipPip
  • 138 posts
  • OS:Windows 7 x64
  • Country: Country Flag
No ideas out there? :huh:
Mit freundlichen Grüßen / Kind regards / Salutations distinguées / Atentamente / Distinti saluti

HØLLØW

#3
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,700 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

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.ne...g-qbasic-2.html
MSFN RULES | GimageX HTA for PE 3.x | lol probloms
msfn2_zpsc37c7153.jpg

#4
MDGx

MDGx

    98SE2ME + 98MP10

  • Super Moderator
  • 2,678 posts
  • OS:none specified
  • Country: Country Flag
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

#5
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,042 posts
  • OS:none specified
  • Country: Country Flag
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-jue...mls/xewc_e.html
it may have a similar effect to what you are looking for.

jaclaz

#6
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,700 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

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.
MSFN RULES | GimageX HTA for PE 3.x | lol probloms
msfn2_zpsc37c7153.jpg

#7
DataCracker7899

DataCracker7899

    Newbie

  • Member
  • 15 posts
  • OS:Windows 7 x86
  • Country: Country Flag
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
I am a professional programmer and plz email me and i will help you. my email is: andregoodarzi@hotmail.com i'm master in many programming languages and i can make websites too.


//AndreG7899
//DataCracker7899

#8
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,042 posts
  • OS:none specified
  • Country: Country Flag

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

#9
Ponch

Ponch

    MSFN Junkie

  • Patrons
  • 3,242 posts
  • OS:none specified
  • Country: Country Flag
and it's an old thread as well, I know everybody can get caught :rolleyes: but DataCracker is like looking for them. :D

#10
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,530 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

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

Attached Files



#11
DataCracker7899

DataCracker7899

    Newbie

  • Member
  • 15 posts
  • OS:Windows 7 x86
  • Country: Country Flag
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

Attached Files


I am a professional programmer and plz email me and i will help you. my email is: andregoodarzi@hotmail.com i'm master in many programming languages and i can make websites too.


//AndreG7899
//DataCracker7899

#12
DataCracker7899

DataCracker7899

    Newbie

  • Member
  • 15 posts
  • OS:Windows 7 x86
  • Country: Country Flag


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.
I am a professional programmer and plz email me and i will help you. my email is: andregoodarzi@hotmail.com i'm master in many programming languages and i can make websites too.


//AndreG7899
//DataCracker7899

#13
DataCracker7899

DataCracker7899

    Newbie

  • Member
  • 15 posts
  • OS:Windows 7 x86
  • Country: Country Flag

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?
I am a professional programmer and plz email me and i will help you. my email is: andregoodarzi@hotmail.com i'm master in many programming languages and i can make websites too.


//AndreG7899
//DataCracker7899

#14
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,042 posts
  • OS:none specified
  • Country: Country Flag

That is very easy here is the code

Interesting you managed to worsen your own code, posted only a couple posts before:
http://www.msfn.org/...ost__p__1025209
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

#15
DataCracker7899

DataCracker7899

    Newbie

  • Member
  • 15 posts
  • OS:Windows 7 x86
  • Country: Country Flag
yeah but the text will blink so so what jaclaz
I am a professional programmer and plz email me and i will help you. my email is: andregoodarzi@hotmail.com i'm master in many programming languages and i can make websites too.


//AndreG7899
//DataCracker7899

#16
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,042 posts
  • OS:none specified
  • Country: Country Flag

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

#17
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
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, 18 February 2013 - 02:03 PM.


#18
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,530 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

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

#19
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
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.

#20
5eraph

5eraph

    Update Packrat

  • MSFN Sponsor
  • 1,142 posts
  • OS:XP Pro x64
  • Country: Country Flag

Donator

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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN