home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 124 / SW_WS.ZIP / SW-45.DOC < prev    next >
Encoding:
Text File  |  1993-06-12  |  55.9 KB  |  1,340 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                                         
  18.  
  19.                    ╔═══════════════════════════════════╗  
  20.                    ║                                   ║▒▒
  21.                    ║           SCREEN  WIZARD          ║▒▒
  22.                    ║       Batch File Enhancement      ║▒▒
  23.                    ║            Version  4.5           ║▒▒
  24.                    ║                                   ║▒▒
  25.                    ╚═══════════════════════════════════╝▒▒
  26.                      ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                                 June 11, 1993
  58.  
  59.                               SCREEN WIZARD 4.5
  60.                                  Warren Small
  61.                                    (c) 1992
  62.  
  63.                               TABLE OF CONTENTS
  64.  
  65. INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  66.      SW.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  67.      DI.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  68.      Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  69.      OPTIONS  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    2
  70.      NOTES ON DOS . . . . . . . . . . . . . . . . . . . . . . . . . . . .    2
  71.  
  72. WINDOW APPEARANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  73.      /F#  Foreground Color   /B#  Background Color  . . . . . . . . . . .    3
  74.      Color Values . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  75.      /L#  Window Border (Lines) . . . . . . . . . . . . . . . . . . . . .    3
  76.      /S#  Shadows . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  77.      /W   Wide Edge . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  78.      /2   Double Spacing   /0  No Margin  . . . . . . . . . . . . . . . .    3
  79.      /R#  Row   /C#  Column . . . . . . . . . . . . . . . . . . . . . . .    4
  80.      /H#  Here  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  81.      /D   Draw Window . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  82.      /Z   Zoom Window . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  83.  
  84. TEXT APPEARANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
  85.      /T#  Text Color   /G#  Global Text Color . . . . . . . . . . . . . .    5
  86.      /E#  Enhanced Text Color . . . . . . . . . . . . . . . . . . . . . .    5
  87.      /M#  Border Message  . . . . . . . . . . . . . . . . . . . . . . . .    5
  88.      /J#  Justify . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
  89.  
  90. SCREEN APPEARANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  91.      /K#  Klear Screen (with optional Fill Character) . . . . . . . . . .    6
  92.      /K#  Klear Screen, set Foreground Color  . . . . . . . . . . . . . .    6
  93.      /K#  Klear Screen (with optional Fill String)  . . . . . . . . . . .    6
  94.      /O#  Outside Edge (Screen Border)  . . . . . . . . . . . . . . . . .    6
  95.      /X#  Xtra Lines  . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  96.      /@#  Set Cursor  . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  97.      /@-  Hide Cursor . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  98.  
  99. OTHER SWITCHES  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  100.      /P#  Pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  101.      /Q   Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  102.      /Q   Function Keys . . . . . . . . . . . . . . . . . . . . . . . . .    8
  103.      /I#  User Input  . . . . . . . . . . . . . . . . . . . . . . . . . .    9
  104.      /I#var  User Input, Custom Variable Name . . . . . . . . . . . . . .    9
  105.      /I#  User Input, Multiple strings  . . . . . . . . . . . . . . . . .   10
  106.      /I####  User Input, Long Strings . . . . . . . . . . . . . . . . . .   10
  107.      /I##*  User Input, Password Blanking . . . . . . . . . . . . . . . .   10
  108.      /N#  Input Line Number . . . . . . . . . . . . . . . . . . . . . . .   10
  109.      /U   Input Uppercase . . . . . . . . . . . . . . . . . . . . . . . .   11
  110.      /ch  Fill Line . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  111.      /ch/ Window Separator  . . . . . . . . . . . . . . . . . . . . . . .   11
  112.      /A#  Alert   /A#,#  Alert with Frequency, Duration . . . . . . . . .   11
  113.      /A##-##[,##]  Alert Sweep  . . . . . . . . . . . . . . . . . . . . .   12
  114.  
  115. DEFAULTS  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  116.  
  117.  
  118.                                       i
  119.  
  120.                               SCREEN WIZARD 4.5
  121.                                  Warren Small
  122.                                    (c) 1992
  123.  
  124. SCREEN DEFINITIONS  . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
  125.  
  126. TIPS AND TRICKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   17
  127.  
  128. SHAREWARE INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . .   18
  129.  
  130. SW.EXE History  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.                                       ii
  180.  
  181.                               SCREEN WIZARD 4.5
  182.                                  Warren Small
  183.                                    (c) 1992
  184.  
  185.                                  INTRODUCTION
  186.  
  187.      The batch  file language for the IBM PC could be  described as useful but
  188. not much  else. It is lacking  a great deal in  terms of  flexibility. These 2
  189. utilities, SW.EXE  and DI.EXE, attempt to make batch files  much more powerful
  190. and at the same time make them nice to look at.
  191.  
  192.      SW.EXE  grew out of  my hatred for  the ECHO  statement. Any  time that I
  193. needed  to say something  to the user, ECHO was the  only way. It was slow and
  194. difficult  to make  look halfway  decent. And  if I  wanted color,  there  was
  195. ANSI.SYS...
  196.  
  197.      DI.EXE was introduced  with SW 4.1 as a  response to users  who have been
  198. utilizing SW as an install  tool for software distribution. DI allows interro-
  199. gation of the disk drives to determine if they are ready for  whatever use you
  200. had in mind. This way you  can avoid hardware  errors which can pop up in  the
  201. middle of your nice SW screens. See DI-13.DOC for the details on using DI.
  202.  
  203.      SW.EXE will display up to  50 lines of text in a window using either  its
  204. command  line format  or an  external  'Screen  Definition' file.  With either
  205. method, the color of each line can be  defined separately or as a group. Also,
  206. the colors for  the window, its border, the  screen background and its  border
  207. can  be specified. Five  different window borders are  possible and the screen
  208. background can be filled with characters or complete strings.
  209.  
  210.      SW.EXE  also provides  functions  for  retrieving  input from  the  user,
  211. either single keystrokes or strings, controlling batch  file execution through
  212. branching and alerting the user with various sounds or even simple tunes.
  213.  
  214. Command Line Syntax:
  215.  
  216.        SW [options] "text1" [options] ["text2"] [options] ["text3"] ...
  217.  
  218. External File Syntax:
  219.  
  220.                              SW @filename [label]
  221.  
  222.      The  biggest advantage to using  the external file approach  is that more
  223. than  one window  can be displayed  with only  one call to  SW! This can  be a
  224. tremendous speed advantage if the batch file is being run from a floppy  disk.
  225. The screen definition can  also be written into  the batch file  that utilizes
  226. it so that  disk space is used  optimally. The optional  label shown  above is
  227. used to mark different definitions within the same file. The demo batch  file,
  228. SW45DEMO.BAT, contains  many examples of  both methods. See  page 14 for  more
  229. information.
  230.  
  231.      On the  next page is a  list of the various  switches along with a  short
  232. description  of what  each does. This  list appears on  the screen when  SW is
  233. called without parameters.
  234.  
  235.  
  236.  
  237.                                     Page 1
  238.  
  239.                               SCREEN WIZARD 4.5
  240.                                  Warren Small
  241.                                    (c) 1992
  242.  
  243.                                    OPTIONS
  244.  
  245.  Window:  /f# Foreground (0-15)  /b# Background (0-7)  /l# Border (0-5)
  246.           /s# Shadow (1-4)  /w Wide Edge  /2 Double Spacing  /0 No Margin
  247.           /r# Row (1-25)  /c# Col (1-80)  /h# here + #  /d Draw  /z Zoom
  248.  Text:    /t#|g# Text (0-15)  /e# Enhanced Text  /m# Border Msg  /j# Justify
  249.  Screen:  /k#[ ] Clear screen (0-7) [char]  /o# Outside edge  /@# Set Cursor
  250.  Other:   /p#[-] Pause  /a#[,#] Alert (0-9) /q... Query  /char Fill Line
  251.           /i# User Input  /n# Input Line  /u Uppercase  /x# Xtra Lines
  252.  
  253.      Switches can be  in almost any order, upper or lower case  (except /q and
  254. /i, see page 8), and a space is required between each.
  255.  
  256.                                  NOTES ON DOS
  257.  
  258.      - There is a limit to  the length of  a command line whether it is  typed
  259. directly from the DOS prompt or  inside a batch file. This  limit is 128 char-
  260. acters. Anything past that point will be ignored.
  261.  
  262.      - The Query feature  described on page 8 makes use of Errorlevel codes to
  263. allow the batch file to determine which key  has been pressed. A series  of IF
  264. ERRORLEVEL  x statements  are used to test  for the value. You  must test from
  265. largest to  smallest since the statement will be true if the value is equal to
  266. OR greater than x.
  267.  
  268.      - The User  Input feature (page 9) and four  DI switches make use of  the
  269. DOS Environment. (DOS 3.3  or higher is  required for these features) This  is
  270. an area in memory  containing information stored by your boot up procedure  as
  271. well as some  programs. You can see  this information by  typing SET  from the
  272. command  line. There are  three variables  commonly found  in the environment.
  273. PATH is  a list of directories  DOS will search  to find a program  not in the
  274. current  directory.  You  must set  this  yourself,  usually  as  part  of the
  275. AUTOEXEC.BAT  file. COMSPEC  tells DOS  where to  find COMMAND.COM.  If it  is
  276. anywhere but the root  directory of the  boot drive, you will have to  set it.
  277. PROMPT  describes what the DOS prompt will look like. Your DOS manual has more
  278. information.
  279.  
  280.      - To check  the answers returned by User Input, the IF statement is used.
  281. In your batch  file, the variable  name must  be preceded  and followed the  %
  282. sign. On page 9 is a quick example. If you wish to check the actual value  use
  283. this form:
  284.                     IF "%ANS%"=="" goto Label
  285.  
  286. This will  branch to Label if the  user entered nothing. Use IF NOT to reverse
  287. the logic of the comparison.  Adding NOT to the above example would branch  to
  288. Label if ANS had some value.
  289.  
  290.      - To  be sure  there is  room in  the environment  you can  set the  size
  291. manually when  booting. "SHELL=C:\COMMAND.COM  /E:512 /P"  in your  CONFIG.SYS
  292. file will set the size to 512 bytes. This value can be as large as 32768. 
  293.  
  294.  
  295.                                     Page 2
  296.  
  297.                               SCREEN WIZARD 4.5
  298.                                  Warren Small
  299.                                    (c) 1992
  300.  
  301.                               WINDOW APPEARANCE
  302.  
  303. /F#  Foreground Color   /B#  Background Color
  304.      Foreground and background  colors for the window are  set by the /f#  and
  305.      /b#  switches. The  color can  be selected  using the  numbers  or names.
  306.      Valid background colors are  limited to 0-7. If your command line gets to
  307.      be longer than  128 characters, use the numbers  to gain some space.  DOS
  308.      will ignore anything past the 128th position on the command line.
  309.  
  310.                                  Color Values
  311.  
  312.                0 or bla = Black      8 or BLA = Grey          
  313.                1 or blu = Blue       9 or BLU = Bright Blue   
  314.                2 or gre = Green     10 or GRE = Bright Green  
  315.                3 or cya = Cyan      11 or CYA = Bright Cyan   
  316.                4 or red = Red       12 or RED = Bright Red    
  317.                5 or mag = Magenta   13 or MAG = Bright Magenta
  318.                6 or yel = Brown     14 or YEL = Yellow        
  319.                7 or whi = White     15 or WHI = Bright White  
  320.  
  321. /L#  Window Border (Lines)
  322.      Border type is defined by the /l# (line) switch.
  323.  
  324.                /l0 - none     /l1 - ┌─       /l2 - ╔═
  325.                /l3 - ╒═       /l4 - ╓─       /l5 - █▀
  326.  
  327.      If a  character is  used instead  of a  number, it  will be  used as  the
  328.      window border. (e.g. /l* or /l▓).
  329.  
  330. /S#  Shadows
  331.      A shadow can be  added with the  /s# option.  If the shadow covers  other
  332.      characters on the screen they will be darkened, rather than hidden.
  333.  
  334.                /s1 - right, below (default if /s is used alone)
  335.                /s2 - left, below
  336.                /s3 - right, above
  337.                /s4 - left, above. 
  338.  
  339. /W   Wide Edge
  340.      The /w switch will give your window a wide edge, making it 2 rows  taller
  341.      and  4 columns wider.  Using this  option will reduce  the maximum string
  342.      length  to 64 and  the maximum number of  lines from 20 to  18 if you are
  343.      using a  screen definition. The /w switch will have no effect on a window
  344.      with no border (/l0).
  345.  
  346. /2   Double Spacing   /0  No Margin
  347.      The /2 option will  add a blank line between  each text line  passed. The
  348.      /0 switch removes the  blank space between the  border and first and last
  349.      lines of text.  Combine /0 with the /l0  switch and the resulting  window
  350.      will be only as large as needed for the text passed.
  351.  
  352.  
  353.                                     Page 3
  354.  
  355.                               SCREEN WIZARD 4.5
  356.                                  Warren Small
  357.                                    (c) 1992
  358.  
  359. /R#  Row   /C#  Column
  360.      The position  of the  window  can  be set  using the  /r# (row)  and  /c#
  361.      (column) switches. These are referenced  to the upper left  corner of the
  362.      window.  If the  window is  too big  to fit,  these coordinates  will  be
  363.      adjusted by the program. Thus if you have a line that places a window  in
  364.      the  lower right hand corner and  you want to add a shadow, just put a /s
  365.      on  the end  of  the line  and the  window  will be  positioned  properly
  366.      without changing the row and column switch values.
  367.  
  368.      If you wish to set the  size of the window yourself, a second /r# and /c#
  369.      will define the bottom  row and right column.  If the text  passed to  SW
  370.      will  not fit  in  the  window, these  settings  will be  adjusted by  SW
  371.      automatically,  adjusting the bottom  and right  sides first.  If you set
  372.      only top  and bottom  or left  and right,  SW will  calculate the  proper
  373.      values for you.
  374.  
  375.      A shorthand  version of absolute  sizing is available.  You can now  show
  376.      the start and end with one switch for the height,  /r#### and one for the
  377.      width, /c####. The first 2 digits are the start value. /r1020 is  equiva-
  378.      lent to /r10 /r20, saving 3 characters on the line. 
  379.  
  380. /H#  Here
  381.      For  simpler positioning,  /h# (here) will  set the row  according to the
  382.      present cursor  position adding  # to  it if  provided. The value  can be
  383.      plus  or minus.  Use the  /h# switch  when you're  trying to  mix  screen
  384.      output from another program with an SW window.  The window can be  easily
  385.      placed relative  to the  other text  and will  be centered left  to right
  386.      unless you use the /c# switch.
  387.  
  388. /D   Draw Window
  389.      When a Pause,  Query or User Input is  utilized, the window will  "popup"
  390.      on the screen  and disappear when  the pause  finishes or  the input  has
  391.      been processed. If you  want the window to be left on the screen, specify
  392.      the /d  switch. This will draw  the window instead.  See page  8 for more
  393.      information on Pause, Query and User Input.
  394.  
  395.      ┌──────────────────────────────────────────────────────────────────────┐
  396.      │ NOTE TO PREVIOUS USERS  -  Since Pause, Query and User Input windows │
  397.      │ now disappear when the function is completed, you may wish to change │
  398.      │ your batch files by adding the /D switch.                            │
  399.      └──────────────────────────────────────────────────────────────────────┘
  400.  
  401. /Z   Zoom Window
  402.      A special effect for  SW is Zoom Window. Sometimes called "exploding"  by
  403.      other  applications, this  switch will  cause the window  to be  drawn in
  404.      several steps, from  small to its final size.  The shadow and border  are
  405.      zoomed as well with the text added when the proper size is reached.
  406.  
  407.  
  408.  
  409.  
  410.  
  411.                                     Page 4
  412.  
  413.                               SCREEN WIZARD 4.5
  414.                                  Warren Small
  415.                                    (c) 1992
  416.  
  417.                                TEXT APPEARANCE
  418.  
  419. /T#  Text Color   /G#  Global Text Color
  420.      Text color  can be controlled with the /t# and /g# switches. Both use the
  421.      same  color table shown above  and both are position  sensitive. /g# will
  422.      change the text color  for all text following the switch. /t# will effect
  423.      only the text string immediately after  the switch. Multiple /g# switches
  424.      could be used to color groups of lines. To make "text" blink,  add 128 to
  425.      the color # or  put a + after the color name. (e.g. red+ = 4 +  128 = 132
  426.      = blinking red). The window foreground color can also blink if desired.
  427.  
  428. /E#  Enhanced Text Color
  429.      This switch selects  the "enhanced"  text color. This  is the color  used
  430.      when you  want to highlight  characters within a  line.   The location of
  431.      this switch  is important  as it  effects only  those lines of  text that
  432.      follow it,  like the /G#  switch. In fact,  you could  use the  switch to
  433.      give each line a different highlight color. 
  434.  
  435.      Marking  characters to be  highlighted in  a line can  be accomplished in
  436.      one  of two  ways. The Query  example on page  8 shows  the use  of the ~
  437.      (tilde) character preceding the 'Y' and 'N' and  will cause these charac-
  438.      ters  to appear  bright red  (/eRED) while  the rest of  the text  is the
  439.      default bright white. If the e parameter is  omitted, SW.EXE will use the
  440.      color of the current  line with the opposite intensity. There is no limit
  441.      to the number of characters that can be highlighted on each line.
  442.  
  443.      If you want to highlight a group of characters on a line, an  alternative
  444.      to placing a ~ in front of each  character is to surround the  portion of
  445.      the line you want highlighted  with curly braces ({ and  }). If you  need
  446.      to use any these  characters on a  line without highlighting, use a  pair
  447.      of each. The string "{{Normal Text}}"  will appear as "{Normal  Text}" in
  448.      the window without being highlighted.
  449.  
  450. /M#  Border Message
  451.      A  /m# preceding a  text string marks the string  as a Border Message. If
  452.      it  is the first  string in the window, it will  appear at the top. If it
  453.      appears after the first line of regular text, the message will appear  at
  454.      the bottom. The # must  be l, r or c for  left, right and  center. Center
  455.      is the default  if /m is  used alone.  The message  color is defined  the
  456.      same way as all other text with /t#, /g#, and /e#.
  457.  
  458. /J#  Justify
  459.      Text can  be justified  (aligned) to  the left  or right as  well as  the
  460.      default  centering.  This  switch  works  on  all  strings  following its
  461.      position, just like  /g#. /jl will align text  left and /jr will line  up
  462.      the text to the right. /jc would restore the default.
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.                                     Page 5
  470.  
  471.                               SCREEN WIZARD 4.5
  472.                                  Warren Small
  473.                                    (c) 1992
  474.  
  475.                               SCREEN APPEARANCE
  476.  
  477. /K#  Klear Screen (with optional Fill Character)
  478.      The /k#  switch will clear the screen  using the color # (0-7) and places
  479.      the cursor at  the upper left  corner. A  single character  can be  added
  480.      after the # to  give some texture  to the screen. (e.g.  /k4─  or /kred─)
  481.      This can make the shadow effect more interesting. 
  482.  
  483. /K#  Klear Screen, set Foreground Color
  484.      A second /k# switch on the  same line can be used to set the screen fore-
  485.      ground  color (0-15).  SW /kblu  /kWHI sets  the screen  color to  bright
  486.      white  on blue. This  will NOT  affect the current DOS  screen color. The
  487.      default screen foreground value is 7 or whi.
  488.  
  489. /K#  Klear Screen (with optional Fill String)
  490.      Instead of a simple fill character for the background, a string could  be
  491.      used in  the form /k#string. The string  can be up to 80 characters long.
  492.      Interesting patterns will result  depending on the  length. Lengths  like
  493.      2, 4, 5, 8, 10,  etc. divide into 80 evenly. Other values result in  each
  494.      line being offset from the last. Don't limit  yourself to just words. Use
  495.      some of  the special IBM characters  in different  combinations. The Demo
  496.      batch  file has  some examples.  If you  want spaces  within the  string,
  497.      either surround the string with quotes  or substitute the underscore  (_)
  498.      for each space. They will be replaced by spaces before being displayed.
  499.  
  500. /O#  Outside Edge (Screen Border)
  501.      The  /o# switch will  set the  screen border color. All  color values are
  502.      valid. Using the switch without a color will reset the border to  normal.
  503.      This switch  could be used  alone to set  or reset  the border.  SW /ored
  504.      will  set the  screen  border  to red.  Some programs  ignore  the border
  505.      color, others  reset it and still others  set one of  their own. You will
  506.      have to experiment on your own is you wish to  set a special border color
  507.      for a program.
  508.  
  509. /X#  Xtra Lines
  510.      SW  is EGA 43 and VGA  28/50 line aware, i.e. if the screen is already in
  511.      one  of those modes, SW will  be able to utilize the  entire screen. This
  512.      switch  allows SW  to setup  28, 43 and  50 line displays  by using /X28,
  513.      /X43 and /X50 respectively.  /X25 will return to the normal 25 line mode.
  514.      The maximum text lines displayed  in a box is increased to 23 for the  28
  515.      line  mode, 38 in the  43 line mode  and 45  in the 50 line  mode. 5 more
  516.      lines can be displayed if the window uses /L0 /0 for parameters.
  517.  
  518. /@#  Set Cursor
  519.      If you wish to move the  cursor to a particular place on the screen, this
  520.      switch will accomplish it. The number which follows /@ can  be a row or a
  521.      row and col. /@15 will  place the cursor on row 15  col 1 and  /@234 will
  522.      set it on row 2 col 34. The next text output to the screen will begin  at
  523.      this point. It is important to note that setting the column to  something
  524.      other than 1 will affect only the first line put on the  screen. The rest
  525.      will start at the left margin. This switch does NOT affect SW's output.
  526.  
  527.                                     Page 6
  528.  
  529.                               SCREEN WIZARD 4.5
  530.                                  Warren Small
  531.                                    (c) 1992
  532.  
  533. /@-  Hide Cursor
  534.      SW  can  hide  the  cursor after  it  has finished  processing  with this
  535.      switch. You can make  the cursor reappear with any SW command which means
  536.      that you  need to  include this switch on  each command line if  you want
  537.      the cursor to remain  hidden. Only one instance  of the switch  is neces-
  538.      sary in a screen definition.
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.                                     Page 7
  586.  
  587.                               SCREEN WIZARD 4.5
  588.                                  Warren Small
  589.                                    (c) 1992
  590.  
  591.                                 OTHER SWITCHES
  592.  
  593. /P#  Pause
  594.      The /p#  switch will pause for #  10ths of a second before proceeding. If
  595.      # =  0 or is missing the program  will wait for the  user to press a key.
  596.      If you  combine Query  and Pause,  the pause  will occur after  the query
  597.      unless the query  specifies a default (See below).  Adding a - after  the
  598.      number will allow the user to interrupt the  timer. e.g. /p50- will pause
  599.      for 5  seconds or less if the user presses a key. Maximum value for pause
  600.      is 300 or 30 seconds.
  601.  
  602. /Q   Query (Controlled Branching)
  603.      The Query  switch (/q...)  allows user  input of  single characters.  The
  604.      selected key  sets the  DOS Errorlevel allowing  conditional branches  in
  605.      your batch file. 
  606.  
  607. Example:       sw /eRED "Continue?" "~Yes  ~No" /qyn
  608.                if errorlevel 2 goto exit
  609.                if errorlevel 1 goto next
  610.  
  611.      This will wait for  the user to press  the 'y'  or 'n' key rejecting  all
  612.      other keystrokes with a  'beep'. If 'n' is pressed, Errorlevel 2 will  be
  613.      set and the batch file will  branch to the label ":exit".  'y' will cause
  614.      a branch to ":next".
  615.  
  616. /Q   Function Keys
  617.      The  Query can  also  look  for function  keys, if  desired. They  can be
  618.      included  in the string  with other  characters in  the form "/qabc[F1]".
  619.      Pressing the F1  key, in this case, will return EL 4. F1  through F10 can
  620.      be  used with F10  being represented  by [F0]. See the  section on Screen
  621.      Definitions beginning on page 14 for a special application of F1.
  622.  
  623. /Q   Special Characters, ~ ` ^ *
  624.      If the  ~ (tilde) character immediately  follows the /q,  the ESC key  is
  625.      also available and will set Errorlevel 0 if  pressed. Up to 70 characters
  626.      can be designated as  option keys. If you  wish to use the  space bar  or
  627.      the  piping (|)  and redirection  (< or  >)  characters, enclose  all the
  628.      characters in quotes. (e.g. /q"abc "). Query is not case-sensitive.
  629.  
  630.      The `  or ^ character can  be used to indicate  a default choice for  the
  631.      Query. This choice is available to avoid conflicts with NDOS/4DOS.
  632.  
  633. Example:       sw /eRED "Continue?" "~Yes  ~No" /q^yn
  634.  
  635.      This makes  a 'Y' the default.  SW will return Errorlevel  1 if ENTER  is
  636.      pressed. Also,  by  combining  a pause  with a  default  choice, SW  will
  637.      return the default if no key is pressed before the pause time elapses.
  638.  
  639.      An  asterisk (*) used in the  Query string acts  like a wild card choice.
  640.      SW will return an Errorlevel corresponding to its position in thestring.
  641.  
  642.  
  643.                                     Page 8
  644.  
  645.                               SCREEN WIZARD 4.5
  646.                                  Warren Small
  647.                                    (c) 1992
  648.  
  649. Example:  sw /eRED "Press ~Y to Continue" "Any other key to abort" /qy*
  650.  
  651.      'Y'  returns Errorlevel  1  and  all other  keys return  2. ESC  and/or a
  652.      default response  could be  combined with  the wildcard  option as  well.
  653.      Pressing ENTER  would then return  the default  choice as  would a  Pause
  654.      timeout.
  655.  
  656.      Users who wish  SW to flush  the keyboard  buffer prior  to checking  for
  657.      Queries  can use an uppercase /Q  switch rather than a /q. In both cases,
  658.      the result of the query is the same.
  659.  
  660. /I#  User Input (Requires DOS 3.3 or higher)
  661.      The /i# switch  will add an  edit line  to the  window which will  accept
  662.      User Input.  The # defines the  length of the line.  This feature can  be
  663.      used  to ask  for directory  names, file  names,  drive letters  or other
  664.      information which can  then be used by  the batch file.  SW will  put the
  665.      answer in  the batch file's  environment with the  label ANS.  DOS 3.3 or
  666.      higher is needed for this feature. You  can then use the ANS  variable in
  667.      your batch  file. A  Pause used with  this feature will  occur after  the
  668.      input.
  669.  
  670. Example:            sw "Which Directory?" /i40
  671.                     if exist %ans%\nul cd %ans%
  672.  
  673.      This  does has  some  limitations  since  it is  difficult  to check  the
  674.      validity of the answer from a batch file.
  675.  
  676.      ┌─────────────────────────────────────────────────────────────────────┐
  677.      │ NOTE TO SW 3.8 USERS: If you have used the /i# switch in your batch │
  678.      │ files,  be sure to remove the line  "CALL SW-ENV.BAT" since  SW 4.x │
  679.      │ does not create the  batch file in favor of direct  manipulation of │
  680.      │ the environment.                                                    │
  681.      └─────────────────────────────────────────────────────────────────────┘
  682.  
  683. /I#var  User Input, Custom Variable Name
  684.      Optionally, you can specify your own  environment variable name with  the
  685.      /i# switch.  The variable is indicated  by a string,  up to 8  characters
  686.      long, placed  after the number.  e.g. /i24Dir  gives you  a 24  character
  687.      field  and  places the  answer  in  the  environment  variable DIR.  (All
  688.      environment variables  are shifted to upper case.) This allows you to get
  689.      more than one string  before processing. Just be sure your environment is
  690.      sized properly. Check the SHELL command in your DOS manual.
  691.  
  692.      The string input  editing keys include HOME,  END,  ,  , BackSpace,  DEL,
  693.      INSert and  Overtype modes  and use  of the  ESCape key  for aborting.  A
  694.      large  cursor indicates the  Overtype mode  and a  small cursor signifies
  695.      Insert. 
  696.  
  697.      IMPORTANT NOTE:  SW 4.2a altered the  action of ESC  by NOT changing  the
  698.      original  value and  returning EL  1  to the  batch file.  This  prevents
  699.      unnecessary  alteration of the  environment. If  an error  occurs when SW
  700.  
  701.                                     Page 9
  702.  
  703.                               SCREEN WIZARD 4.5
  704.                                  Warren Small
  705.                                    (c) 1992
  706.  
  707.      tries to add the result to the environment, an EL 2 will  be returned. EL
  708.      0 is returned with normal input.
  709.  
  710.      When using  the /I  switch, SW will check  the environment to see  if the
  711.      variable you  are using is already present.  If it is,  the value will be
  712.      used as  a default value in  the User Input field.  A SET command  should
  713.      always precede  an SW  call with  the /I  switch. If  you do  NOT want  a
  714.      default, you have to  make sure the variable  is not present.  'SET ANS='
  715.      preceding  the input  call will make  sure there is  no value in  the ANS
  716.      variable. 
  717.  
  718.      Like the /Q  switch, /I will flush the keyboard buffer if an uppercase /I
  719.      is used rather than /i. The results for both are equivalent.
  720.  
  721. /I#  User Input, Multiple strings
  722.      Assuming that  you  have adequate  space  in  your environment,  you  can
  723.      retrieve more than one string from  a user with only one call to SW. This
  724.      is only  practical for screen  definitions since it requires  a good deal
  725.      of information to set it  up and probably would not fit in a 128  charac-
  726.      ter command line.  Each input defined  would need  its own variable  name
  727.      and prompt. The only caveat to this method  is that an ESC is not record-
  728.      ed except by the last /I to be processed.
  729.  
  730. /I####  User Input, Long Strings
  731.      If you need  to get  string input that is  longer than the maximum  field
  732.      length of 70  , use the form /I####. The  last 2 digits define the  field
  733.      size and  the rest  of the  number represents  the maximum length  of the
  734.      string. e.g  /I8020 defines a  20 character field  with a maximum  string
  735.      length of  80. Additionally, if  the default value found  in the environ-
  736.      ment exceeds the string length, SW  will automatically adjust to  compen-
  737.      sate.  However, the  string cannot  be  made  any longer.  Maximum string
  738.      length  is 127 characters minus the length of  the variable name. Maximum
  739.      field length is 70 if it is on  a line by itself. The field  size will be
  740.      adjusted  if its length plus the length of text  on the same line exceeds
  741.      70 or 64 if using wide margins.
  742.  
  743. /I##*  User Input, Password Blanking
  744.      For anyone  wanting to  use SW  to get  password input,  add an  asterisk
  745.      between the  length and the  variable name (if  used). This prevents  the
  746.      password from being displayed on the  screen by substituting an  asterisk
  747.      for each character entered, improving security.  It is important to  note
  748.      that since a batch file is being used  to check to validity of the entry,
  749.      someone could  find out  what the password is  by looking at the  file so
  750.      you should  at least hide the file  to make it  more difficult to circum-
  751.      vent. 
  752.  
  753. /N#  Input Line Number
  754.      By default, the User  Input field is placed on  the last line of the box.
  755.      By using  the /n# switch, the  field can be  placed on any line.  If # is
  756.      positive, the  field will  appear after the  string on  line #.  If #  is
  757.      negative, the field will appear by itself on line #.
  758.  
  759.                                    Page 10
  760.  
  761.                               SCREEN WIZARD 4.5
  762.                                  Warren Small
  763.                                    (c) 1992
  764.  
  765. /U   Input Uppercase
  766.      If you want only uppercase characters in the  answer, use the /u  switch.
  767.      This can  be useful when asking  for a  drive letter and want  to put the
  768.      results on the screen for verification.
  769.  
  770. /D   Draw Window
  771.      Pause, Query  and  User Input  windows "popup"  on the  screen, i.e  they
  772.      disappear after the Pause, Query or Input finish. /D  is used if you want
  773.      the window to stay on the screen. 
  774.  
  775. /ch  Fill Line
  776.      This parameter  is used  to indicate  a character  which will be  used to
  777.      fill  a text  line position  in the  window. Any  character that  is  not
  778.      already used by another  switch is valid. This  switch could be  used for
  779.      horizontal  separators in  the text  box  using a  ─ (ASCII  196) or  a ═
  780.      (ASCII 205). The area filled  is just inside the border  of the box.  The
  781.      switch should  be positioned as  if it were a string  on the command line
  782.      or within the Screen  Definition. Its color can  be specified the same as
  783.      a normal  text line. See the  first Screen Definition on  Page 14 for  an
  784.      example of its use.
  785.  
  786. /ch/ Window Separator
  787.      This switch is  similar to Fill  Line except  that it will fill  the line
  788.      completely. If a  horizontal line drawing character (ASCII 196 or 205) is
  789.      used along with  borders /l1 through /l4, the  line will be connected  to
  790.      the border. The line will assume the color of the border.
  791.  
  792. /A#  Alert   /A#,#  Alert with Frequency, Duration
  793.      The  Alert switch (/a#) can be used  to produce the normal IBM  beep if #
  794.      is 0  or missing. If that's too boring, nine other sounds can be produced
  795.      varying from simple tones to more  complex sounds using the values below.
  796.  
  797.  
  798.                              Alert Switch Values
  799.                       1 - Low Freq Tone    5 - Bweep Two
  800.                       2 - Mid Freq Tone    6 - Bomb     
  801.                       3 - High Freq Tone   7 - Siren    
  802.                       4 - Bweep One        8 - Phasor   
  803.                                  9 - Tweeter
  804.  
  805.      The demo batch file gives you a chance to try them all.
  806.  
  807.      The /A switch can also produce any tone that the PC speaker  can put out.
  808.      Using the  form /A##,##, the  first number will  be the  frequency of the
  809.      tone  (20-20000)  and the  second  is its  duration  (1-300 tenths  of  a
  810.      second). Using a screen definition, songs  are actually possible using  a
  811.      series  of lines like "_window  /a440,1". This produces  a 440 hertz tone
  812.      for 1 tenth of  a second. SW45DEMO.BAT  has some short examples. The  use
  813.      of a  screen definition is  needed for  speed of  execution. Trying  this
  814.      from several command  lines in the batch file will result in  a less than
  815.      smooth output.
  816.  
  817.                                    Page 11
  818.  
  819.                               SCREEN WIZARD 4.5
  820.                                  Warren Small
  821.                                    (c) 1992
  822.  
  823.      For you  musicians out  there, there  is an  easier way  to create  those
  824.      little tunes. Notes can be specified with the  /A switch as well.  Middle
  825.      C is designated as  C4. A sharp is  shown as C4#  and a flat as  B3b. The
  826.      full form of the switch is /AA4,10 which will play  an A, 4th octave, for
  827.      1 second. The tunes in SW45DEMO.BAT use  this form of /A. The valid range
  828.      is from E0 to  B9. It  should be noted that  the IBM speaker has  limita-
  829.      tions  in reproducing  high notes  and  the  practical limit  is probably
  830.      around a G9  or about 12,000  Hz. Your  results could  vary depending  on
  831.      your computer type.
  832.  
  833. /A##-##[,##]  Alert Sweep
  834.      A quick  sweep  of  tones can  be programmed  with this  form  of the  /A
  835.      switch. This first  number is  the start frequency.  After the hyphen  is
  836.      the finish frequency. Optionally, the  third number can be used to define
  837.      the number  of steps to  be used  from the start frequency  to the finish
  838.      frequency. Each tone is sounded for about 1/18th of a  second so 18 steps
  839.      will take about 1  second. The default is  10 steps. Any  valid frequency
  840.      can be used. Notes values are not accepted.
  841.  
  842.                           Example:  sw /a100-1000,15
  843.  
  844.      This will  start at  100 Hz  and reach  1000 Hz  in 15  steps. The  start
  845.      frequency can be larger than the finish frequency for a reverse sweep.
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.                                    Page 12
  876.  
  877.                               SCREEN WIZARD 4.5
  878.                                  Warren Small
  879.                                    (c) 1992
  880.  
  881.                                    DEFAULTS
  882.  
  883.      Yellow  double line border on  a centered blue  window with white single-
  884. spaced text.  No Clear Screen, Shadow or Zoom.  Enhanced color will default to
  885. the text color with the opposite intensity. (/fYEL /bblu /gWHI /l2 /ewhi)
  886.  
  887. Example:  sw /kwhi /fblu /bred /gYEL "Line 1" /tWHI "Line 2" "Line 3" /s2
  888.  
  889.      This  will display a blue (/fblu)  on red (/bred) window with a shadow to
  890. the left and below it (/s2).  The screen color will be  white (/kwhi). Lines 1
  891. and 3 are bright yellow  (/gYEL) and line 2 is  bright white (/tWHI).  See the
  892. batch file SW45DEMO.BAT for many more examples.
  893.  
  894.      If  no text  strings are  passed,  features such  as Clear  Screen (/k#),
  895. Query  (/q...), Pause (/p#),  Alert (/a#[,#]), and  Outside Edge  (/o#) can be
  896. used with no window output. (e.g. sw /p10 will pause for 1 second.)
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.                                    Page 13
  934.  
  935.                               SCREEN WIZARD 4.5
  936.                                  Warren Small
  937.                                    (c) 1992
  938.  
  939.                               SCREEN DEFINITIONS
  940.  
  941.      Screen  Definitions, introduced  with version  4.0, greatly  enhance  the
  942. flexibility and  power of SW. It  simplifies the command  line by putting  all
  943. the switches and  text into  a file  that SW  can read  into memory.  Multiple
  944. windows can be defined  in the file  and displayed with one call to  SW. Also,
  945. text  handling by one  window is  expanded to 20 single  spaced lines, more if
  946. EGA or VGA modes are used (See /X#, page 6).
  947.  
  948.      When you run SW45DEMO.BAT,  you can easily see the advantages of using  a
  949. screen definition.  All switches  just described  are applicable  in a  screen
  950. definition, including Query, Pause, and User  input. Windows will be displayed
  951. in the order that they are  read from the file. A  pause with the third window
  952. causes the pause to take place after the third window is displayed.
  953.  
  954.      In the batch file, the syntax for using a screen definition is:
  955.  
  956.                              SW @filename [label]
  957.  
  958. The definition can be  in a separate  file or even within the same  batch file
  959. (See  note on page 16).  The optional label is used when more than one defini-
  960. tion is in the  file. The default label is 'Display'. 'End_Display' marks  the
  961. end of the definition.
  962.  
  963.      What follows is  a breakdown  of a portion of  one of the screen  defini-
  964. tions that can  be found in SW45DEMO.BAT. There  are a total  of 5 definitions
  965. used by the  demonstration, three of which are  within the batch file and  two
  966. are from external files. 
  967.  
  968. ┌─────────────────────┬─────────────────────────────────────────────────────┐
  969. │Default Label        │ :Display                                            │
  970. │first window         │ _window /kcya┼ /r2 /s /bred /w /0                   │
  971. │text 1               │ SW.EXE - Expanded Text Handling!                    │
  972. │text 2, new color    │ /tWHI+ Multiple Windows!                            │
  973. │text 3, footer       │ /m  v 4.5                                           │
  974. │2nd window           │ _window /r10 /s /bwhi /gblu /l1 /fred /0            │
  975. │text 1, new color    │ /tBLU Optional Command Line Syntax:                 │
  976. │text 2               │ SW @filename [label]                                │
  977. │3rd window           │ _window /r16 /s /bwhi /gblu /l1 /fred /0            │
  978. │text 1, new color    │ /tBLU SW 4.x ADDITIONAL FEATURES                    │
  979. │text 2, fill line    │ /tred /─                                            │
  980. │text 3, justify left │ /jl - Define the entire screen with multiple windows│
  981. │text 4               │    using external text files.                       │
  982. │4th window, pause    │ _window /r25 /l0 /0 /p100-                          │
  983. │text 1               │ - Press any key for more -                          │
  984. │5th window, pause    │ _window /r19 /bwhi /gblu /l0 /jl /0 /p100-          │
  985. │text 1               │ - Text handling can be expanded to 20 single-spaced │
  986. │text 2               │   lines per window.                                 │
  987. │.                    │ .                                                   │
  988. │.                    │ .                                                   │
  989. │Final label          │ :End_Display                                        │
  990.  
  991.                                    Page 14
  992.  
  993.                               SCREEN WIZARD 4.5
  994.                                  Warren Small
  995.                                    (c) 1992
  996.  
  997. └─────────────────────┴─────────────────────────────────────────────────────┘
  998.  
  999.      The  _window line  contains the  switches  that  describe the  window and
  1000. screen and have the same form  as they would on a  command line, preceded by a
  1001. slash and separated by a space. The  lines that follow will be  interpreted as
  1002. text until another '_window' or the 'end_display' label is found. 
  1003.  
  1004.      The text switches can appear on the same line  preceding the text. The /t
  1005. switch  is used to change the color one line of text and is separated from the
  1006. text by a space. /g can be used before a text line to change the color of  the
  1007. rest of the lines. /j can be used  to change the text alignment and /m is used
  1008. to  specify a border  message. Finally,  /e is used to  specify the "enhanced"
  1009. text color. Multiple switches  can precede the text. The text can be  enclosed
  1010. by quotes if additional spaces before or after  are desired. This example  has
  1011. 4 pauses and defines small  windows that fit inside larger  ones to change the
  1012. text without redrawing the whole window.
  1013.  
  1014.      If a  different label is needed,  simply substitute it for 'Display'. The
  1015. label can be up to  15 characters. In SW45DEMO.BAT 2 of the other  definitions
  1016. use the labels 'Snd_Menu' and '4.5'.
  1017.  
  1018.      Note  that  when using  the /k  switch with  a  fill string  in a  screen
  1019. definition,  do  not use  quotes around  the  fill string.  This is  necessary
  1020. because of the way  the switch is processed  when using the screen definition.
  1021. As  before, if  you need  spaces within  the string,  use the  underscore  (_)
  1022. character. It will be replaced with a space.
  1023.  
  1024.      A Query will  have to be the last  item in the  definition for the return
  1025. code to be valid. User Input can occur anywhere but you  will have to wait for
  1026. the entire definition to be displayed before checking the answer.
  1027.  
  1028.      Environment variables  will be  evaluated when included  inside a  screen
  1029. definition. This enables you  to create a screen to display the user's answers
  1030. or other  information without having to  resort to the  command line mode.  If
  1031. the  variable is not found, the  variable name will be displayed in the window
  1032. just as it appears in the screen definition.
  1033.  
  1034.      It is  possible to "nest"  screen definitions.  One potential  use is  to
  1035. reuse  a portion of  one definition and add a new  window to it. Here's what a
  1036. simple example would look like:
  1037.  
  1038.                                 :Display1    
  1039.                                 :Display2    
  1040.                                  _window ... 
  1041.                                  text        
  1042.                                 :End_Display1
  1043.                                  _window ... 
  1044.                                  text        
  1045.                                 :End_Display2
  1046.  
  1047. The command  "SW @file  Display1" would  show only  the first  window and  "SW
  1048.  
  1049.                                    Page 15
  1050.  
  1051.                               SCREEN WIZARD 4.5
  1052.                                  Warren Small
  1053.                                    (c) 1992
  1054.  
  1055. @file Display2"  would display both. Any  line beginning with  a colon (:)  is
  1056. ignored by SW. This technique could save some disk space.
  1057.  
  1058.      A Screen  Definition  can contain  a  special  help  window that  can  be
  1059. accessed with the F1 key. A Query (See  page 8) must be part of the screen def
  1060. but  it does not  need to include the  F1 key. The help  window is preceded by
  1061. "_window_help" and  is defined the same  as a regular  window. This window  is
  1062. displayed only when  the F1 key is pressed. It is a "popup"  window which will
  1063. disappear after  pressing any key. The  "_window_help" can  appear anywhere in
  1064. the definition and only one is permitted.
  1065.  
  1066. ┌───────────────────────────────────────────────────────────────────────────┐
  1067. │ One final note on Screen Definitions. If you include them in a batch file,│
  1068. │ be certain that the flow of the batch file does not go through the screen │
  1069. │ def. The DOS batch processor will not have any idea what those lines mean.│
  1070. │ If you see a lot of "Bad command or file name" appearing when the batch is│
  1071. │ run, check to see if the screen definition has been bypassed with a goto  │
  1072. │ or check for a goto that directs the batch file to the screen def.        │
  1073. └───────────────────────────────────────────────────────────────────────────┘
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.                                    Page 16
  1108.  
  1109.                               SCREEN WIZARD 4.5
  1110.                                  Warren Small
  1111.                                    (c) 1992
  1112.  
  1113.                                TIPS AND TRICKS
  1114.  
  1115.      - Change the contents  of a window without redrawing the whole thing. Use
  1116. the /l0 and /0 switches to  create a window  just big enough for the text  and
  1117. without a border. This way  you can overwrite part or all  of the inside  of a
  1118. window and change the text in a flash. The first demo screen definition  above
  1119. uses this technique.
  1120.      - Use the ECHO  batch file command to  create screen definitions  "on the
  1121. fly". If  you use the redirect character > and the redirect with append >> you
  1122. can  build a screen definition while running the  batch file. In SW45DEMO.BAT,
  1123. this method is used to create the help screen for DI.EXE. Here is a portion:
  1124.  
  1125.      echo :Display > di.hlp
  1126.      echo _window /kmag▒─┼─▒ /s /bred /r2 /0 /w >> di.hlp
  1127.      echo SW.EXE - Now with DI!>> di.hlp
  1128.      echo /mc  v 4.2 >> di.hlp
  1129.      echo _window /jl /s /0 /r9 >> di.hlp
  1130.      echo /mc  Disk Information >> di.hlp
  1131.      echo.>> di.hlp
  1132.      di >> di.hlp
  1133.      echo. >> di.hlp
  1134.      echo _window /r25 /bblu /l0 /0 /p300- >> di.hlp
  1135.      echo  - Press any key to continue - >> di.hlp
  1136.      echo :End_Display >> di.hlp
  1137.  
  1138. The first  line creates the  file "di.hlp" and  the following  lines append to
  1139. it. Then you call  SW @di.hlp. Please note that, if quotes are used around any
  1140. strings, the >> should be  placed directly after the end  quote so there won't
  1141. be a space after  it in the file.  If there is  a space, SW would  display the
  1142. end quote  in the window which is probably not desirable. You should also keep
  1143. in mind when  capturing text from another program,  that any text longer  than
  1144. 72 characters will be truncated  and should be less than 20 lines long  unless
  1145. you are  using an EGA or VGA mode  (See /X#, page 6).  If more lines are found
  1146. they are  ignored. This way you  can show the  result of  an operation without
  1147. destroying the look of the screen.
  1148.  
  1149.      - Use  the Enhanced  text color attribute  (/e#) to display  text in  two
  1150. colors on the same line. You could make whole words stand out in this manner.
  1151.  
  1152.                        SW /tRED /eRED+ "{Blinking} Red"
  1153.  
  1154.      - If you  want to display an empty  window, set the  size with /r#### and
  1155. /c####, then pass one space in a string. SW /r814 /c2060 " "
  1156.  
  1157.      - Use a FOR  loop to evaluate  errorlevels returned by a Query.  Although
  1158. it is slower and requires  the use of numbered labels,  it can shorten  a long
  1159. series of IF ERRORLEVELs to  one line. In the demo batch file, the sound  menu
  1160. uses a line like the following to select the sound:
  1161.  
  1162.   for %%e in (1 2 3 4 5 6 7 8 9 10 11 12) do if errorlevel %%e goto beep%%e
  1163.  
  1164.  
  1165.                                    Page 17
  1166.  
  1167.                               SCREEN WIZARD 4.5
  1168.                                  Warren Small
  1169.                                    (c) 1992
  1170.  
  1171.                             SHAREWARE INFORMATION
  1172.  
  1173.      These programs  are "shareware".  You are  allowed to  use the  programs,
  1174. free of  charge, for  a reasonable  amount of  time. If  you find  them to  be
  1175. useful, and continue to utilize them, a registration  fee of $15 is  required.
  1176. This will  entitle you to  personal notification of  future releases and  give
  1177. your suggestions for enhancements more value.  Many of the enhancements listed
  1178. in the history are the result of user comments and suggestions.
  1179.  
  1180.                            *** BONUS PROGRAMS! *** 
  1181.  
  1182.      Anyone  registering SW 4.5  will receive a disk  with the latest version,
  1183. plus an  additional  program,  SWV.EXE. This  program is  a  simple text  file
  1184. viewer that integrates with SW. SW can generate  a window and then call SWV to
  1185. display the file within  that window. This  can be indispensable when a  batch
  1186. file needs  to display a large amount of information with  only a little work.
  1187. SWV includes features like Search, Place Marks, and  Zoom to full screen.  SWV
  1188. can be used as a stand-alone as well and is EGA 43 and VGA 28/50 line aware.
  1189.  
  1190.      You  will also  receive SW-DIR.EXE,  a  pop-up  file directory  for batch
  1191. files. It inherits many  of the appearance  switches of SW while allowing  the
  1192. user  to pick from the file  list and return the name through the environment.
  1193. DOS 3.3 or higher is required.
  1194.  
  1195.      The newest  bonus program  is  SW-DOS.EXE  which allows  SW to  call  DOS
  1196. commands or even batch files and have the output confined to a window. It  can
  1197. be used to display  the results of file  copying, archive extractions and even
  1198. a shell to DOS.  Now you don't have to sacrifice  a nice SW screen just to  be
  1199. able to see what your batch file is doing.
  1200.  
  1201.      Finally, you will receive some more examples  of what can be done with SW
  1202. with a  little work and  imagination. Thanks to  Bill Davis for  HIS work  and
  1203. imagination. There  is also  an example  of how  multiple strings  can be  re-
  1204. trieved with a screen definition.
  1205.  
  1206.      Registered SW 3.x  users can upgrade  to SW 4.5  for $5. This  is a  free
  1207. upgrade for  SW 4.x users.  4.x users who wish to receive  SWV, SW-DOS and SW-
  1208. DIR can do so by sending  $2.50 for postage and handling to the address below.
  1209. Please specify disk  size. The file SW-45.REG  is provided to simplify  regis-
  1210. tration and  ordering. CompuServe Members can register by entering GO SWREG at
  1211. the ! prompt and registering ID #641. Just follow the instructions online.
  1212.  
  1213.      Site licenses  can be  negotiated. Feel  free to  give it  to friends  or
  1214. upload  the original  archive file  to other  BBS's  provided  that no  fee is
  1215. charged  for distribution  and it  is not  modified in  any way.  Note to  BBS
  1216. Sysops: Please  post this  archive file as  is, with all  files included,  and
  1217. without changing the filename.
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.                                    Page 18
  1224.  
  1225.                               SCREEN WIZARD 4.5
  1226.                                  Warren Small
  1227.                                    (c) 1992
  1228.  
  1229.  
  1230. SW.EXE Ver. 4.5 - June 11, 1993
  1231.  
  1232. Warren Small                              CIS  71076,407
  1233. 35 Benjamin Street                        GEnie  W.SMALL
  1234. Manchester, NH  03109                     Prodigy  RSJW31A
  1235.  
  1236.                                 SW.EXE History
  1237.  
  1238.      3.6 - 12/31/89  First general release.
  1239.  
  1240.      3.7 - 02/01/90   Increased text lines to  5. Colors can be specified with
  1241. 3 letter codes (p. 3). Added  Here (/h#, p. 4), Double  Spacing (/2, p. 3), No
  1242. Margin (/0, p. 3), Enhanced text color (/e#, p. 5).
  1243.  
  1244.      3.8 -  04/22/91  Added 3 border styles (p. 3), 3 shadow positions (p. 3),
  1245. Pause Interrupt (/p#-, p. 8), User Input (/i#, p. 9).
  1246.  
  1247.      4.0 -  10/31/91   User Input  changed to  modify environment rather  than
  1248. create SW-ENV.BAT (p. 9). Removed limit  on Highlighting (p. 5).  Added custom
  1249. window border (/l#char, p.  3), Border Message  (/m#, p. 5), Justify (/j#,  p.
  1250. 5), Outside Edge  color (/o#, p. 6), 9 Alert sounds (/a#, p.  11), Wide window
  1251. edge (/w, p. 3), Foreground color  for screen (/k# /k#, p.  6), Query wildcard
  1252. (p. 8),  default (p.  8), and Pause  timeout (/q*^  /p#-, p.  8), Window  size
  1253. control (/r# /r# /c# /c#, p. 4). Screen Definitions introduced (p. 14).
  1254.  
  1255.      4.1 - 12/1/91   Enhanced User Input (p.  9). Pause, Query and User  Input
  1256. window  changed to  popup style.  Added Fill  String (/k#string,  p. 6),  Zoom
  1257. Window (/z, p. 4), Input Line (/n#, p. 10), Uppercase Input (/u,  p. 11), Draw
  1258. Window  to  override  popup  (/d,  p.  4,  11),  custom  environment variables
  1259. (/i#var, p. 9). New utility added to check disks (DI.EXE, see separate docs).
  1260.  
  1261.      4.2  - 2/2/92   Added Fill  Line (/char, p. 11),  shorthand window sizing
  1262. (/r#### /c####, p. 4),  Alert Freq, Duration (/a#,#, p. 11) or Note,  Duration
  1263. (/aN,#, p. 12), key buffer flush option for /Q (p. 9)  and /I (p. 10), default
  1264. value for  /I  by setting  environment  variable  (p. 10),  Window  appearance
  1265. modified  slightly for  bordered (1-4)  and  borderless  windows. 5  text line
  1266. limit removed  from command line  form of  SW. Environment  variables are  now
  1267. evaluated inside screen definitions (p. 15). 
  1268.  
  1269.      4.2a - 2/29/92   Fixed bug in  environment variable evaluation in  screen
  1270. files  which caused rest  of file  to be read improperly.  Added another Query
  1271. default indicator ^ for  compatibility with NDOS (p.  8). User Input  enhanced
  1272. to allow large string input in small fields (/I####, p. 10). 
  1273.  
  1274.      4.3 - 6/30/92  /x# added for EGA  43 line & VGA 50 line  modes (p. 6). SW
  1275. now also  detect and setup  43 and 50  line modes. Text  lines longer than  70
  1276. characters  are  truncated  without  displaying  an  error.  "Nested"   labels
  1277. possible in screen defs (p. 15).
  1278.  
  1279.      4.3a -  9/16/92   Corrected /w /l5  /─ bug. Added  multi-input capability
  1280.  
  1281.                                    Page 19
  1282.  
  1283.                               SCREEN WIZARD 4.5
  1284.                                  Warren Small
  1285.                                    (c) 1992
  1286.  
  1287. for screen defs (p. 10).
  1288.  
  1289.      4.3b  - 11/22/92   Fixed /l0 /0 /x43 bug. Added  /@# (p. 6) to set cursor
  1290. position and /@- to hide it (p. 7).
  1291.  
  1292.      4.4  - 12/16/92  Added /x28 mode for VGA displays (p. 6). Added use of {}
  1293. to highlight  groups of  characters (p.  5). Allowed /E#  to be used  for each
  1294. line  of text  (p.  5). Text  handling increased  for  /L0  /0 windows  to the
  1295. maximum the screen will allow (80 characters by 25, 28, 43 or 50 lines.)
  1296.  
  1297.      4.4a - 12/29/92  Fixed  /I bug which caused input  line to appear  in the
  1298. wrong place.
  1299.  
  1300.      4.4b - 3/5/93  Help now in external file to shrink  EXE and provide a way
  1301. for the user to customize it. Added password blanking to /I (p. 10).
  1302.  
  1303.      4.5 - 6/12/93  Window separator added (/ch/,  p. 11). Function keys added
  1304. to Query (p. 8). Help  window added to screen def  (p. 16). Alert  Sweep tones
  1305. added (p. 12).
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.                                    Page 20
  1340.