[comp.lang.rexx] Arexx layering Wshells

Steven.Ayscue@bbs.acs.unc.edu (Steven Ayscue) (04/18/91)

Thanks to Mike Meyer for the tips on using Execio and parse to 
streamline this program...
/*-----------Cut here------------------------*/
/* New and improved layersh */
/* Arexx program using rexxextra.library     */
/* Program to layer new wshells as they are opened */
/* Requires Wshell and the rexxextra library (for the */
/* replace function to work)                          */
ExecIO READ "env:shellwindow" VAR line
parse var line ':' coord1 '/' coord2 '/'
ncoord1 = (coord1+10)
ncoord2 = (coord2+12)
  if ncoord1 > 50
    then  do
            ncoord2=280
	    ncoord1=3
          end
    endif
ncoord1 = right(ncoord1, 3, '0')
ncoord2 = right(ncoord2, 3, '0')
line = replace(ncoord1,coord1,line)
line = replace(ncoord2,coord2,line)
call open('Shellpos','ENV:Shellwindow',Write)
call Writech('Shellpos',line)
call Close('Shellpos')
address command newwsh
/*---------End of file layersh---------------*/
 
Steven.Ayscue@bbs.acs.unc.edu
Net police: "We have the right for you to remain silent....."
--
=============================================================================
	Extended Bulletin Board Service, Research & Development
Office of Information Technology, University of North Carolina at Chapel Hill
	      internet: bbs.acs.unc.edu or 128.109.157.30