[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4221.0. "CLI Screen color" by CSSE32::SMITH (Reality, just a visible imagination?) Wed Oct 24 1990 09:23

Is there a way to change a CLI window's backbground and text colors from within
a shell startup?  I've found out how to change the prompt color but not the
text or background.

I'd like to be able to specify background and text colors that DONOT effect my
preferences.  Possible?  Any PD progs do this?



...Ed
T.RTitleUserPersonal
Name
DateLines
4221.1PREF may be a solutionNBOIS2::FRIES$SET CUSTOMER/NOPROBLEMWed Oct 24 1990 10:0218
>Is there a way to change a CLI window's backbground and text colors from within
>a shell startup?  I've found out how to change the prompt color but not the
>text or background.
    
    Yes, it is.
    
    I've written 'pref' which changes the system-configuration.
    
    Usage: pref devs:<any other conf>
    
    With this utility I was able to change colors, printers and so on
    without rebooting.
    
    Please answer here if  You are interested in an upload.
    
    Cheers
    Gerald
    
4221.2Sure!LEDS::ACCIARDIProbing the limits of adhesionWed Oct 24 1990 10:038
    
    I just did this a month or so ago.  I am using Nazcron to perform
    automatic backups of my wife's subdirectory.  The batch file includes
    AmigaDOS escape sequences to reverse the text and background color.
    
    I'll post how I did it tonight, when I have my Amiga in from of me.
    
    Ed.
4221.3AmigaDOS escape sequencesCSSE32::SMITHReality, just a visible imagination?Wed Oct 24 1990 13:266
re .2

Great Ed.  This sounds like what I'm after.


...Ed
4221.4LEDS::ACCIARDIProbing the limits of adhesionWed Oct 24 1990 21:1614
    
    
    Echo "*E[0;0H*E[41;30m*E[J"		; causes the current window to go to
    					  inverse video
    
    
    Echo "*E[0;0H*E[40;31m*E[J"         ; returns the window to normal
    
    
    I'm not sure where these escape codes are documented in full; I just
    used the one included in the standard 1.3 Shell-Startup file.
    
    
    Ed.
4221.5WJG::GUINEAUThu Oct 25 1990 09:472
I think they're in the ROM kernel manual (libraries and devices in the 
console chapter) and/or the AmigaDOS manual by Bantam books.
4221.6CLI screen ESC sequence, didn't quite work as expected.CSSE32::SMITHReality, just a visible imagination?Thu Oct 25 1990 10:2811
I tried the ESC sequence last night and it worked, but not as expected.  It
inversed the cli window but only the current display.  As soon as I went beyond
the current screen it reverted back.  Also when I typed the text was reverted
to normal.  In other words it inverse video'd the current display but didn't
change my mode to inverse video.

I tried it just within the CLI window and not in the shell startup.  Could that 
have made a difference?


...Ed
4221.7ELMST::MCAFEESteve McAfeeThu Oct 25 1990 10:424
If your prompt has an escape sequence in it you may be setting the
colors back to normal.

-steve
4221.8LEDS::ACCIARDIProbing the limits of adhesionThu Oct 25 1990 11:2911
    
    Try putting the escape secquence in the Shell-Startup with an alias
    such as 'reverse'.  Then, the first command that your batch file
    executes in it's window would be 'reverse'.
    
    This is what I've done, and my Shell window indeed remains inversed
    whilst scrolling etc.
    
    Ed.
    
    
4221.9CLI Screen colors.... ESC seq works!CSSE32::SMITHReality, just a visible imagination?Fri Oct 26 1990 09:4316
The ESC sequences worked!  The problem I had was the PROMPT command was 
resetting them.  After adding the background and text color ESCs to the
PROMPT command all works well.  Thanks Ed A.

For those interested...



*E[4_m	sets the background color where _ defines one of the 4 workbenck colors
*E[3_m	sets the text color where _ defines one of the 4 workbenck colors

Cheers,


...Ed
4221.10Please upload prefWELSWS::FINNISSun Oct 28 1990 18:116
    RE .1
    
    Please upload the pref program it sounds like what I require.
    I need to change the workbench size on the fly.
    
    				-Pete-
4221.11OKNBOIS2::FRIES$SET CUSTOMER/NOPROBLEMMon Oct 29 1990 03:125
    Pete,
    
    please be a little patient. i'll upload it as soon as possible.
    
    Gerald
4221.12WELSWS::FINNISMon Oct 29 1990 18:156
    Sorry to sound impatient, It's Just that I noticed that your offer to
    upload had not been taken up .
    
    #include <std/grovell/appology>
    
    			Pete :-(
4221.13OKNBOSWS::FRIESTue Oct 30 1990 02:165
Because my Amigo is at home while I'm not, I can't upload 'pref' before 
tomorrow. On wednesday it will be on TAPE::, OK???

Do You need source or executable (or both)?
Gerald
4221.14It's on TAPENBOSWS::FRIESWed Oct 31 1990 05:325
I uploaded pref.lzh.
It's on TAPE::USER2:[upload]

Cheers
Gerald
4221.15PREF.LZH = BAD Archive ??HPSCAD::GATULISFrank Gatulis 297-6770Thu Nov 01 1990 09:0010
    
    I tried downloading PREF.LZH last night without success.  I always
    end up with a file on the Amiga = PREF.LZH  0 bytes long.  
    
    I also get VMS error trying to unarc it on the VAX with LHARC.
    
    I have no problem downloading anything else.  Is this a bad archive?
    
    Frank
    
4221.16Worked for me today.BELFST::MCCLINTOCKPeterThu Nov 01 1990 09:231
    
4221.17I, however, had the same problem as .15PAMSRC::BARRETTBe Excellent to each otherThu Nov 01 1990 11:221
    
4221.18CLO::COBURNGrowing older, but not up...Thu Nov 01 1990 11:305
    VMS LHARC works OK for me. How did you download the file? 
    
    My copy of it is only 3 blocks long (I think). 
    
    John
4221.19What did I wrong?NBOSWS::FRIESTue Nov 06 1990 02:5610
Sorry about Your difficulties.

That was the first time I uploaded a file.
I lharced four (4) files on my amiga then copied it with DOS2DOS onto I*M 
format. After that I used PCSA to copy it again in my VMS account.
The last thing I did was a 'spool copy' onto TAPE::

Wasn't that correct???
I can't reead that file with VMS-lharc either.
Gerald
4221.20CLO::COBURNGrowing older, but not up...Tue Nov 06 1990 14:409
    It was the copy using PCSA that killed the file (most likely). After
    copying with PCSA you probably need to reset the file characterics to
    Stream_LF. I forget the specifics - Either use CVTARC or FILESET to
    change the file. 
    
    The difference is that CVTARC may change the file contents and FILESET
    only messes with the file header. Try both.
    
    John
4221.21NBOSWS::FRIESWed Nov 07 1990 03:2217
>    It was the copy using PCSA that killed the file (most likely). After
>    copying with PCSA you probably need to reset the file characterics to
>    Stream_LF.

I wonder why a download from tape:: using PCSA and dos2dos is simple while an 
upload is not.

> Either use CVTARC or FILESET to change the file. 

Please give me a hint (I don't know what You think about).

Tomorrow I will upload an uncompressed version in my own directory
and will point You to it. 

Sorry about that
Gerald
  
4221.22CLO::COBURNGrowing older, but not up...Wed Nov 07 1990 22:4115
    Re: .21
    
    The main difference between the upload and download is that during
    'upload' PCSA creates the file on VMS (and it is usually incorrect in
    this scenario). During the 'download' the VMS file is already created
    and you are creating the MSDOS file (just a byte stream). 
    
    RMS in general causes several problems when dealing with PC, UN*X and
    Amiga files (unless consistency is maintained in creation and access).
    
    I can't offer any other advice about what to try next without further
    information (a DIR/FU on the created file and maybe a DUMP/RECORD of
    the first few blocks).
    
    John
4221.23NBOSWS::FRIESMon Nov 12 1990 03:148
Now I've uploaded 'pref.c' and 'pread.me'
to 
    NBOSWS::SWAS$USER:[FRIES.PUBLIC]

Sorry about the newlines in it, but that seems to be the same PCSA upload
problem again.

Gerald