home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 68,012 of 68,980   
   Zaidy036 to John Stockton   
   Re: I want a non-editing file display Wi   
   06 Mar 23 14:09:11   
   
   From: Zaidy036@air.isp.spam   
      
   On 3/6/2023 7:02 AM, John Stockton wrote:   
   > On Sunday, 5 March 2023 at 22:34:01 UTC, Zaidy036 wrote:   
   >> On 3/5/2023 4:28 PM, John Stockton wrote:   
   >>>   
   >>> I have scripts which generate (in %TEMP%) a plain-text file of batch code,   
   and I want to read this file by eye, in a new plain Window, then manually   
   copy'n'paste or drag'n'drop selected lines or contiguous groups of lines into   
   a Command Prompt window,   
    which will be ready and waiting. The lines all start "DEL" or "RD"; but must   
   be thought about and selected before execution. I want to be UNABLE to alter   
   the characters displayed, apart from by scrolling.   
   >>>   
   >>> The batch command   
   >>> START MSEDGE %1   
   >>> does this, except that it does not work in Windows XP and that it opens a   
   new tab rather than a new Window. In any case, EDGE is "a sledgehammer to   
   crack a nut", and I don't want to have a window/tab which looks in the least   
   like any browser that I    
   have open.   
   >>>   
   >>> So : is there an obscure but standard small part of Windows 10+ that can   
   display a text file in a simple non-editable Window that supports Ctrl-C and   
   vertical scroll? Notepad would do nicely, if it could be opened in a non-edit   
   mode.   
   >>>   
   >>> Can VBScript or JScript called from batch create such a Window _easily_?   
   >>>   
   >>> Ideally, but certainly not essentially, I would like the displayed text to   
   be on a light-coloured background !   
   >>>   
   >>>   
   >> COLOR XX & TYPE    
   >   
   >   
   > I wasn't sufficiently aware of COLOR (and it might nowadays be illegal of   
   Microsoft to have failed to implement, as an alternative, the correct spelling   
   "COLOUR") - thanks for that.  It would be nice to have a modification which   
   applies the new colour    
   only to subsequent lines.   
   >   
   > I would want to use a different Command Prompt window to receive the copied   
   selected lines; but START CMD will open one, of usefully different visual   
   styling.   
   >   
   > I need to test the idea out, to see whether the chief user (me) likes it in   
   operation.   
   >   
   >   
   Following batch changes font color but not the background color:   
      
   :: _Color.bat   
      
   :: %1 is color [R]ed, [G]reen, [Y]ellow, or [W]hite   
   :: %2 is text to be typed and if contains spaces requires "..."   
      
   :: Examples   
   ::   CALL _Color.bat R RED   
   ::   CALL _Color.bat G "GREEN GREEN GREEN"   
      
   ECHO OFF   
      
   IF "%1"=="R" ECHO ^%~2   
   IF "%1"=="G" ECHO ^%~2   
   IF "%1"=="Y" ECHO ^%~2   
   IF "%1"=="B" ECHO ^%~2   
   IF "%1"=="M" ECHO ^%~2   
   IF "%1"=="C" ECHO ^%~2   
   IF "%1"=="W" ECHO ^%~2   
   IF "%1"=="BR" ECHO ^^%~2   
   IF "%1"=="MR" ECHO ^^%~2   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca