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!

goBoating help me! perl color question

Status
Not open for further replies.

oinkers

Programmer
Jun 14, 2000
23
0
0
US
Have u ever gotten color to work in perl? win32 system.<br><br>example:<br><br>----------------------<br>use Term::ANSIColor;<br>print color(&quot;red&quot;),&quot;red color should be here&quot;, color(&quot;reset&quot;);<br><br>---------------------<br><br>here is the output: <br>red color should be here
 
never tried......looks interesting though.....I'll poke around a little <p> <br><a href=mailto: > </a><br><a href= > </a><br> keep the rudder amid ship and beware the odd typo
 
I've done a little playing.&nbsp;&nbsp;I am running into the same behavior you are with Term::ANSIColor.<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>....'just thinking (typing) out loud......I suspect that the Win32 'dos' window is not ANSI compliant.&nbsp;&nbsp;I can't find any specifications on the 'dos' window to determine if this is the case.&nbsp;&nbsp;The Term::ANSIColor module is ANSI specific. <br><br>However, there is a <FONT FACE=monospace><i>color</i></font> dos command for controling foreground and background color.&nbsp;&nbsp;You could call that from your Perl.<br><br>You can make system calls to mod the appearance of the window.<br><br><FONT FACE=monospace><br>#!perl<br>system(&quot;color 37&quot;);<br>print &lt;&lt;EndPrint;<br>Some grey text in an aqua screen.<br>The first digit is background color and second is foreground(text).<br>See windows help-&gt;dos-&gt;Command Index for help on color codes.<br>Type color at the prompt to reset to defaults.<br>EndPrint<br></font><br><br><br>Is Tk an alternative?&nbsp;&nbsp;It provides alot of GUI function and is not to difficult to play with.<br><br>'hope this helps <p> <br><a href=mailto: > </a><br><a href= > </a><br> keep the rudder amid ship and beware the odd typo
 
ya i had a feeling that the ansi color was not supported in dos. The system call changes the entire screen. But it doesnt change just the part of the text that i want. I think we are fighting a lost cause here. hehe. But thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top