INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Cant get text to blink

Cant get text to blink

(OP)
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???

RE: Cant get text to blink

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 Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Cant get text to blink

(OP)
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.



 

RE: Cant get text to blink

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 Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Cant get text to blink

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
 

RE: Cant get text to blink

(OP)
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...

RE: Cant get text to blink

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 Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

RE: Cant get text to blink

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

RE: Cant get text to blink

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.

RE: Cant get text to blink

(OP)
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!

RE: Cant get text to blink

Amen!
 

RE: Cant get text to blink

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close