Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant get text to blink

Status
Not open for further replies.

vibeman

Programmer
May 25, 2009
4
GB
Hi, Silly one this, its probably staring me in the face. Part of my program builds a list of machines in my database. Bacause of what I do with the list, the number of machines in it needs to be kept below a certain number. As the routing is run which builds the list, it keeps a tally and displays it at the bottom of the screen. I want to display the tally in green as the number is low, then change to flashing yellow as the max number gets near. I can change to yellow no problem but getting it to flash?????

have read the manual and used NG but I just can't find the answer. This is the bit of code;

set color to w+/b
@25,20 say "Number of machines ="
set color to g+/b
if NumMacs>60
set color to gr+/b
end if
@25,42 say str(NumMacs)

How the hell do I get it to flash???
 
before I answer, I think there is a restriction on the use of offensive language here - and you may be on the wrong side of it.

The 'blinking' attribute - which may not be supported very well on all machines - is activated by the asterisk character.



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Firstly, if I have offended anyone with my four letter word, I appologise. Offensive language is NOT neccesary but when you are constantly bombarded by a tirade of much stronger words, even on childrens TV, than words like the one I used do not seem offensive any longer and sometimes you just forget. Snakes on a plane? now thats offensive language and I refuse to watch it.

Anyhow, appologies over and back to the point of the thread.

The manual tells me to use an asterisk to get the text to blink so I tried

set color to gr+*/b

and also

setblink(.T.)
set color to gr+*/b

and just get a different colour background.

I was hoping somwbody could post a snippet of code with the correct usage of the asterisk.

Cheers, Steve.



 
Hi,

I just tested your code on a Vista machine and it didn't work, because the blink attributes are controlled (I think) by the hardware - and the command window is abstracted from that and doesn't support it... (Clipper programs running in command/DOS windows). Alt-Enter doesn't work on Vista, either... so no full screen is available.

So, I moved the code (same .exe) to an XP machine and it doesn't work in a DOS window... but does if you press Alt-Enter to get a full screen display (which I think supports my idea about the hardware level being required).


Shame, but not everything is backward compatible.


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Are you running in Windows?
When my program runs full screen the flash works, when it is in a window it doesn't.
It must be something to do with Windows, so try it full screen. But my background remains the same!

Not help I know, but an explanation.
Kind regards
 
Hi,

I run my program in full screen on a win98 system. I have Vista on my main PC but for work, without going into the boring details, I have to stick to 98SE.

So it seems I'm no further forward...
 
I don't have a Win98 machine to test it on anymore, but the code does work fine (flashing the forground) on XP in full screen - so it *should* work on Win98.




Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
I have, by chance, just finished installing 98SE and it works as expected... flashing full screen, not flashing in window.

clear screen
@0,0 say ' Program demonstration ' color 'w*/r'

Once compiled, the above code works, tested on XP, flashing white on red when full screen.

Sorry, but I cannot think why it doesn't work on your system.

Kind regards
 
Also, check the screen resolution setting. Some do not allow blinking characters (high resolution) in DOS.

You pretty much have to be 640X480 text for the blinking attribute to be correct.

David.
 
Thanks for all the replies. I have it sussed.

set color to gr*/b works

set color to gr+*/b doesn't

set color to *gr+/b works

Obviously the high intensity attribute followed by the blink attribute confuses the system but if you put the blink attribute first, then the color, then the high intensity attribute, bingo!

The lord works in mysterious ways and so does clipper!
 
As Griff said, blinking on Windows only works in full-screen. Better get rid of the requirement, because all modern Clipper compilers, like (x)Harbour, do not support the blinking either, and they do mostly not support full-screen applications, as it's not a real DOS application any longer. Last I heard, was that MS would like to get flashing attribute away, but it has hit 'em hard returning with all flashy GIF's on many internet pages...

HTH
TonHu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top