home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / 2ndshift.zip / 2NDSHIFT.DOC < prev    next >
Text File  |  1990-07-15  |  44KB  |  824 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                   2nd Shift
  8.  
  9.                                  Version 1.0
  10.  
  11.  
  12.  
  13.                        Copyright (c) 1990, 1991, 1992
  14.                              Transversal Design
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                              Transversal Design
  25.                                 PO Box 66082
  26.                            Chicago, IL  60666-0082
  27.                       Beeper: (312) 999-0745 (digital)
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.                                                                         071590
  37. First Things First:
  38.  
  39. Please take the time to read the License, Warranty and Registration
  40. information.  If you have received this file without printed documentation,
  41. this information is contained in the file named LICENSE.DOC.
  42.  
  43. The information contained in this file/pamphlet outlines copyright
  44. information, licensing agreement, warranty, technical support policies and
  45. additional information about registering your software.  It also includes
  46. descriptions of other programs by Transversal Design in which you might be
  47. interested.  Please take the time to read this information to be sure you
  48. understand your rights and the expectations/guidelines of Transversal Design.
  49. Introduction:
  50.  
  51. Welcome to 2nd Shift!  The fact that you have bought or downloaded this
  52. program indicates that you have come to the same conclusion that we at
  53. Transversal Design did:  why can't the computer do some things without having
  54. someone sitting at the keyboard?  Many parts of any job are simply running the
  55. computer at specific times and doing the same steps.
  56.  
  57. The computer can be a very powerful tool.  Unfortunately, many software
  58. companies assume that someone will be sitting at the computer telling the
  59. proggram which step to take next.  Some have macro abilities but still need
  60. someone to start the program and macro.  Many have the ability to be run in a
  61. batch file with automatic spreadsheets and macros to be run, but still need
  62. someone to start the batch file.
  63.  
  64. Enter 2nd Shift.  With 2nd Shift, you can automate practically any program,
  65. regardless of its initial design.  The concept is simple.  You set up a batch
  66. file to wait until a certain time and/or date, then execute the desired
  67. program with pre-recorded keystrokes to pass to the program.  You run the
  68. batch file, then walk away.  It is exactly the same as if you gave the
  69. computer a list of things to do at specific times.  2nd Shift "fakes" the
  70. computer into thinking someone is sitting there typing.
  71.  
  72. We chose to call the program 2nd Shift because we believe it will be used to
  73. execute instructions during non-business hours.  Rather than pay an employee
  74. to come in and babysit the computer, make the computer your second shift
  75. employee!  This would allow you to use your employee in a more creative,
  76. satisfying and productive fashion than just babysitting a computer.  It could
  77. also be used to perform tasks during a given week while an employee is on
  78. vacation, or used to perform tasks when an employee calls in sick.
  79.  
  80. 2nd Shift does have limitations.  One known incompatibility is that Sidekick
  81. cannot be loaded into the computer while 2nd Shift executes (either in record
  82. or playback mode).  This is due to the fact that Sidekick is notorious for
  83. "re-stealing" some of the interrupts that 2nd Shift uses.  Later versions of
  84. 2nd Shift may be compatible with Sidekick.
  85.  
  86. Another limitation is that the playback program requires approximately 50k and
  87. the record program requires approximately 70k to run.  This includes a 32k
  88. buffer for keystrokes.  Some programs may not have enough memory to execute
  89. with 2nd Shift loaded.  For instance, if you are using a spreadsheet program
  90. printing very largge worksheets, you may not have enough memory to load 2nd
  91. Shift, the keystrokes, the spreadsheet program and the worksheet. 
  92. Experimentation will tell you if you are running into a memory problem.
  93.  
  94. The real number of keystrokes which are recorded is approximately half of the
  95. 32k buffer.  This is because every time a key is typed on an IBM or
  96. compatible, two pieces of information are returned.  Some programs use one
  97. piece, others use the second and some use both.
  98.  
  99. Some programs "flush" the keyboard before any keystrokes are accepted.  Thes
  100. programs will not work with 2nd Shift.  The way to tell is to run the desired
  101. application and type keystrokes before the computer is ready for them.  If the
  102. typed keys are lost, the playback will not be able to "type" them either. The final limitation is that the application cannot require human interaction. 
  103. For instance, you can't use 2nd Shift to format 50 disks because someone needs
  104. to put the disks in the drive (sorry, we haven't figured out a software
  105. solution for this... yet).  You coudl use it to format a 40 meg tape in your
  106. backup unit and backup the drive after the formatting of the tape is done.
  107.  
  108. To get the most out of 2nd Shift, you should have a fair knowledge of DOS and
  109. how to execute programs.  We wwill cover batch files and basic setup of the
  110. same.
  111.  
  112.  
  113. Conventions Used:
  114.  
  115. One of the main problems of all software documentation is how to differentiate
  116. between what to type and other information.  We will use UPPERCASE letters to
  117. signify what to type.  Any information enclosed within less-than ( < ) and
  118. greater-than ( > ) signs means to locate and press the key within the signs,
  119. not the letters themselves.  For instance, <Enter> means to press the key
  120. labelled "Enter" (note: on some computers, this may be labelled as "Return"). 
  121. <F1> would mean to press the <F1> key, not to type the letter F followed by
  122. the number 1.  <Shft-F1> means to hold the shift key down and press F1, <Ctrl-
  123. F1> means to hold the Ctrl (or control) key down and press F1, and <Alt-F1>
  124. means to hold the Alt key down and press F1.  When uppercase is used, it
  125. always referes to a program name or a directory name.
  126.  
  127.  
  128. The Programs:
  129.  
  130. 2nd Shift comprises of six programs and two batch files to cover all levels
  131. and desires of users.  They are:
  132.  
  133. Timer.EXE         Makes the computer wait until a specific time and/or date.
  134. 2ndShift.EXE      The playback program.
  135. 2ndWatch.EXE      The recording program.
  136. 2ndConv.EXE       Converts a text file into a 2nd Shift keystroke file.  This
  137.                   program is only included with registration of the software.
  138. KeyConv.EXE       Converts a 2nd Shift keyfile into a text file.  This program
  139.                   is only included with registration of the software.
  140. 2ndTest.EXE       Simple example file.
  141. PlayBack.Bat      Example batch file.
  142. Record.Bat        Example batch file.
  143.  
  144.  
  145. General Information:
  146.  
  147. Computers are dumb.  They must be told what to do at every step.  When they
  148. don't have an instruction, they typically just sit there and wait (kind-of
  149. like a number of employees you may have encountered).
  150.  
  151. Programs, in a broad sense, are a collection of instructions for the computer. 
  152. Generally, this collection of instructions will carry out the desired steps
  153. within the context of the program.  A user must instruct the program what to
  154. do next whenever it is finished with a sequence of instructions.
  155. When you first turn on the computer, DOS takes over and waits for you to give
  156. it a command at the DOS prompt.  When you type in a program name, you are
  157. telling DOS that you want to run that program.  DOS can only execute three
  158. types of "programs":  1) .EXE files, 2) .COM files and 3) .BAT files.  DOS has
  159. a limit of eight characters for the file name, along with three characters for
  160. an extension.  The .EXE, .COM and .BAT are extensions.  EXE and COM files are
  161. executed immediately, whereas BAT files are a collection of steps to be done
  162. in a specific order.  These are called batch files.  All software
  163. documentation, at a minimum, tells you the eight characters (program name/
  164. command) to start their program.  DOS executes all programs from a) internal
  165. commands first (such as DIR or COPY), b) the current directory next, then, c)
  166. if not found in the current directory, in the path specified by your
  167. AUTOEXEC.BAT file, in the order the directories are specified.  If DUMMY.COM,
  168. DUMMY.EXE and DUMMY.BAT all exist in the same directory(ies), DUMMY.COM is the
  169. program which will be executed.  If DUMMY.EXE and DUMMY.BAT will never be
  170. executed, even if you type the extension.  COM files are always executed
  171. first; EXE files are executed next if a COM file is not found, and finally,
  172. BAT files are executed if an EXE file is not found.  If a BAT file is not
  173. found, DOS gives the message of "Bad command or file name".
  174.  
  175. Most programs require more information from the user to carry out their tasks. 
  176. This is done in two ways:  1) by asking the user for the additional
  177. information and/or 2) by command-line parameters.  For example, the program
  178. for formatting diskettes requires that you specify the drive in which you will
  179. be formatting the diskettes as a command-line parameter.  If you don't specify
  180. the drive, format gives you a warning that you will be formatting your hard
  181. drive.  Once you have entered the correct command line, format prompts you for
  182. the disk and waits until you press enter.  It then formats the disk and asks
  183. you if you want to format another.  Format uses both command-line parameters
  184. and prompts for additional information (OK to proceed, disk in drive).  The
  185. program doesn't quit until you tell it your are done.
  186.  
  187. Since 2nd Shift is intended to execute without anyone sitting at the computer,
  188. all information required is entered using the command-line method.
  189.  
  190.  
  191. Batch Files:
  192.  
  193. As stated earlier, batch files are a special kind of file telling DOS to
  194. execute a series of commands.  Each line is executed one at a time.  The next
  195. line is not executed until the current line is done; this is signified by the
  196. program on the line quitting.
  197.  
  198. Batch files can be used to automate a sequence of steps.  Once a program in
  199. the batch file is run, it keeps control of the computer until the current
  200. program (instruction) is completed.  The program itself generally requires
  201. that someone type the keys to tell the program that they are finished.  2nd
  202. Shift provides a way to pass keystrokes to the program, telling it what to do
  203. and when to quit.  This collection of keystrokes to play back to the program
  204. is called a keyfile.
  205. It is important that you understand how batch files execute.  This batch file
  206. is your "to do" list for the computer.  TIMER is used to "pause" the computer
  207. until the time/date desired, then the next instruction is executed.  2nd Shift
  208. will usually be called next to execute a particular program.  2nd Shift will
  209. run the program specified, "typing" the keys needed for the program to execute
  210. properly.
  211.  
  212.  
  213. Installation:
  214.  
  215. 2nd Shift is one of several utilities available from Transversal Design.  Most
  216. users, after they have had their systems for a while, will have collected a
  217. hodge-podge of utilities and really don't know where to store them.
  218.  
  219. The simple solution is to make a directory called \UTILITY and put all these
  220. program files there.  If you have not already made such a directory, type the
  221. following:
  222. MD \UTILITY            <Enter>
  223. Change to the directory with:
  224. CD \UTILITY            <Enter>
  225.  
  226. If you purchased 2NDSHIFT via shareware, the fact that you are reading this
  227. document indicates that you have already unzipped the file.  Copy the 2ndShift
  228. program files to the \UTILITY directory.
  229.  
  230. If you purchased 2NDSHIFT directly from Transversal Design, insert the 2nd
  231. Shift diskette in drive A and copy the files:
  232. COPY A:*.*             <Enter>
  233.  
  234. DOS always looks for files in the current directory first and in its startup
  235. path second, as mentioned earlier.  You should make sure that the UTILITY
  236. directory is a part of this path.  Enter the following:
  237. TYPE \AUTOEXEC.BAT     <Enter>
  238. If you do not see a line that starts with the word PATH, you should edit your
  239. AUTOEXEC.BAT file to have at least the following: PATH \UTILITY.  If you do
  240. see the word PATH, you should edit the line so that it includes the path
  241. \UTILITY.  Remember, each directory must be separated by a semicolon.  Below
  242. is a typical path.
  243.   PATH C:\;C:\DOS;C:\WP;C:\UTILITY
  244. Note that the last directory does not have a semicolon after it.  This example
  245. path tells DOS, when trying to find a command to execute, to look in its
  246. internal commands first (such as DIR or COPY), then the current directory,
  247. then the root dirctory (C:\), then the DOS directory (C:\DOS) then the WP
  248. directory (C:\WP) and finally in the UTILITY directory (C:\UTILITY) before
  249. giving up and saying "Bad command or file name".
  250.  
  251. Getting Started:
  252.  
  253. Perhaps the easiest way to see how to use 2nd Shift is to run the example
  254. files.  Included with 2nd Shift is a simple little program called 2NDTEST. 
  255. This program asks for you first name, your last name, and a password (similar
  256. to the logon procedures for a lot of bulletin boards or electronic mail
  257. services).  After you type in the information, the program writes the
  258. information you typed to the screen.  Run the program now, by typing:
  259. 2NDTEST                <Enter>
  260.  
  261. Answer the questions as they are presented to you.  Although this example is
  262. not very sophisticated, it does illustrate our point: why can't the computer
  263. do this typing for you?
  264.  
  265. The answer is that it can, but the keystrokes must first be recorded.  Rather
  266. than telling how right now, run the batch file called RECORD by typing:
  267. RECORD                 <Enter>
  268. RECORD tells 2NDWATCH to record the keystrokes recorded while running 2NDTEST. 
  269. These keys are stored in a file called 2NDTEST.KEY.  Now, to see what 2nd
  270. Shift can do for you, run the batch file called PLAYBACK by typing:
  271. PLAYBACK               <Enter>
  272. PLAYBACK calls 2NDSHIFT, telling it to run 2NDTEST using the keys in
  273. 2NDTEST.KEY.
  274.  
  275. Congratulations!  You just ran 2nd Shift from start to finish.  The steps are
  276. always:
  277.         1)   Create the key file for a program (usually by recording your
  278.              keystrokes).
  279.         2)   Play back the keyfile as needed.
  280.  
  281. 2NDWATCH is used to watch the keyboard and record keystrokes, and 2NDSHIFT is
  282. used to play back those keystrokes.
  283.  
  284.  
  285. Now, let's create a "real world" example.  Type:
  286. TIME                        <Enter><Enter>
  287. This will display the time which the computer thinks it is.  Add 10 minutes to
  288. the time.  For the purpose of this example, we will assume that the computer
  289. reported that the time is now 1:00 p.m.  Enter the following, substituting
  290. your time where 1:10p is at:
  291. COPY CON:PLAY2.BAT          <Enter>
  292. TIMER 1:10p                 <Enter>
  293. 2NDSHIFT 2NDTEST.KEY        <Enter>
  294. <F6>                        <Enter>
  295. Now, type:
  296. PLAY2                       <Enter>
  297. The computer will wait until 1:10 p.m., then execute 2NDTEST using the keys in
  298. 2NDTEST.KEY.  It's as if you were there typing it.
  299. Take a moment to think about this.  You just performed some work on your
  300. computer without having to type the information required by the program.  You
  301. just automated the task without having to retype your name and password, and
  302. told the computer to perform the task at a specific time.  Even though this is
  303. a trivial example, you could have told the computer to wait until 8:00 p.m.
  304. (2nd Shift) and perform the task.
  305.  
  306. Now, for a not-so-trivial example.  Assume you have a tape backup on your
  307. computer and you always perform a full backup at the end of the day.  This
  308. usually takes an hour and you have to sit there and wait while the computer
  309. does it.  Fine; you could start the process and just go home, but you also
  310. print a list of all files after the backup.  Let's say you also load your
  311. spreadsheet program and print the current sales figures for the day.  Every
  312. day at 3:30, you type the following (NOTE: this is an example; do NOT type the
  313. instructions):
  314. CD \TAPE               <Enter>
  315. TAPE                   <Enter>   (type keystrokes to do backup and quit)
  316. COPY TAPE.LOG PRN      <Enter>   (print files backed up)
  317. CD \SPREAD             <Enter>
  318. SPREAD                 <Enter>   (type keystrokes to load sales figures and
  319.                                  print)
  320.  
  321. In essence, that hour and a half is wasted because you are sitting there
  322. waiting on the computer.  Granted, you are probably doing other things like
  323. catching up on the incoming mail, but you have to interrupt yourself when the
  324. next step is required.
  325.  
  326. To automate this whole procedure, we must first record the keystrokes for the
  327. TAPE and SPREAD programs.  So, at 3:30, you would type the following (again,
  328. this is an example, do not type these commands):
  329. CD \TAPE                         <Enter>
  330. 2NDWATCH TAPE.KEY TAPE.EXE       <Enter>
  331. (type the keystrokes to do a full tape backup and quit the program)
  332. COPY TAPE.LOG PRN                <Enter>
  333. (batch file line, no need to record)
  334. CD \SPREAD                       <Enter>
  335. 2NDWATCH SPREAD.KEY SPREAD.EXE   <Enter>
  336. (type the keys to load the sales figures, print, then quit)
  337.  
  338. Now, we've recorded the keys.  There was very little additional work on your
  339. part, just telling 2NDWATCH to record your keystrokes.  Let's create the batch
  340. file to automate all of this.  We're going to call it ENDDAY.BAT and put it in
  341. the \UTILITY subdirectory.  You would type the following:
  342. CD \UTILITY                      <Enter>
  343. COPY CON:ENDDAY.BAT              <Enter>
  344. CD \TAPE                         <Enter>
  345. 2NDSHIFT TAPE.KEY                <Enter>
  346. COPY TAPE.LOG PRN                <Enter>
  347. CD \SPREAD                       <Enter>
  348. 2NDSHIFT SPREAD.KEY              <Enter>
  349. <F6>                             <Enter>
  350.  
  351. Now, at the end of the day, you would just type ENDDAY and the rest would be
  352. done for you.  Note that you didn't have to specify the program name.  It is
  353. stored in the keystroke file(s).
  354.  
  355. To further expand this example, let's say you have an employee come in at 8:00
  356. p.m. to do these steps.  For the sake of argument, assume that all of the
  357. sales figures are not in the computer until 8:00 p.m.  Instead of having the
  358. employee do these steps, you would enter the following batch file:
  359. CD \UTILITY                      <Enter>
  360. COPY CON:ENDDAY.BAT              <Enter>
  361. TIMER 8p                         <Enter>
  362. CD \TAPE                         <Enter>
  363. 2NDSHIFT TAPE.KEY                <Enter>
  364. COPY TAPE.LOG PRN                <Enter>
  365. CD \SPREAD                       <Enter>
  366. 2NDSHIFT SPREAD.KEY              <Enter>
  367. <F6>                             <Enter>
  368.  
  369. Now, this employee can be freed from this task.  You could move the employee
  370. to another area or train him/her in tasks which better use his/her time. 
  371. Please note that we do not advocate replacing employees with computers via 2nd
  372. Shift.  We do advocate automating tasks using the computer, freeing employees
  373. and management to do more important and creative word.  At the end of your
  374. day, you would type ENDDAY and the rest would be done at 8:00 p.m.
  375.  
  376. The preceding examples should be enough to get you started.  Remember, the
  377. steps are always:
  378.         1)   Record your keystrokes
  379.         2)   Play them back from a batch file using TIMER to set the time for
  380.              playback.
  381.  
  382. Experiment with your frequently-used applications.  Learn to think of ways in
  383. which the computer can be made to act as an employee with TO-DO lists.
  384.  
  385.  
  386. Other Uses:
  387.         o    Record keystrokes and create batch files to do tasks while you
  388.              are on vacation.
  389.         o    Automate daily routines so that, if you should ever be sick, you
  390.              can make a quick call and say "Run TODAY" rather than go through
  391.              every step.
  392.         o    Use for tech support to analyze what problems a user may be
  393.              having by seeing exactly what they typed during a given session. 
  394.              This applies to any department or company providing tech support
  395.              for either its users or employees.
  396.         o    Automate log-on sequences for bulletin boards.
  397.         o    Automate calling a bulletin board and logging on during cheaper
  398.              billing hours, downloading specific programs or information, then
  399.              logging off.
  400.  
  401. Use your imagination.  Our examples have only shown TIMER waiting until a
  402. specific time.  TIMER will also allow specifying a particular date before it
  403. passes control to the next line in a batch file.
  404. Miscellaneous:
  405.  
  406. A reference section follows giving in-depth information on each of the
  407. programs and its command-line parameters.  We have not covered 2NDCONV or
  408. KEYCONV in the main documentation.  The reasons for this are 1) they are not
  409. included in the un-registered shareware version and 2) both 2NDCONV and
  410. KEYCONV are not for the novice computer user.  2NDCONV and KEYCONV convert the
  411. binary keystrokes into human-readable form and back again.  They are intended
  412. a) to allow someone providing tech support to read the keystrokes entered and
  413. perhaps determine problems that a particular user may be having, b) to provide
  414. human-readable keystrokes for computer use/user information for a particular
  415. session, and c) to allow editing of a keyfile (record the keystrokes, convert
  416. to human-readable format, make any needed modifications, and re-convert to the
  417. keyfile format).  The format of a keyfile is covered in Appendix A and the
  418. format for a text file of keystrokes is covered in Appendix B.
  419.  
  420. There is only one potential problem in the use of 2nd Shift, and it has to do
  421. with a DOS limitation, not any program flaw with 2nd Shift.  This is that a
  422. batch file cannot directly call another batch file and still come back to the
  423. original batch file.  For instance, say you had a batch file called SALES.BAT. 
  424. SALES holds the following:
  425. CD \SPREAD                  <Enter>
  426. 2NDSHIFT SPREAD.KEY         <Enter>
  427.  
  428. At any time, you can execute the SALES batch file to pass the keys held in
  429. SPREAD.KEY to your spreadsheet program.  Typing SALES (using our previous
  430. example) will print your sales reports.
  431.  
  432. You have another batch file called DOBACK.BAT which holds:
  433. CD \TAPE                    <Enter>
  434. 2NDSHIFT TAPE.KEY           <Enter>
  435.  
  436. Again, from our previous examples, typing DOBACK will do a complete backup of
  437. your drive.
  438.  
  439. You would think that you could just combine them into a third batch file,
  440. holding:
  441. TIMER 8p                    <Enter>
  442. DOBACK                      <Enter>
  443. SALES                       <Enter>
  444.  
  445. What will actually happen is that, since DOS can only manage one batch file at
  446. a time, DOBACK would be executed at 8 p.m., but SALES will never execute
  447. because the original batch file being executed was "clobbered" in memory by
  448. DOBACK.
  449. The way around this while still keeping the ability to run DOBACK or SALES
  450. individually would be to load a secondary command processor.  Without getting
  451. into the technical details, this simply means that you preface each batch file
  452. (except the last) with the program COMMAND.COM (the secondary command
  453. processor).  Since it loads into a different memory area than the original
  454. command processor, the secondary command processor is the one keeping track of
  455. the embedded batch file.  When it finishes, the place in the original batch
  456. file is still known by the original command processor.  Your third batch file
  457. is now:
  458. TIMER 8p                    <Enter>
  459. \COMMAND.COM /C DOBACK      <Enter>
  460. SALES                       <Enter>
  461.  
  462. The \COMMAND.COM /C loads the second command processor for DOBACK and removes
  463. it when DOBACK is done.  This would need done for all but the last batch file
  464. called by the controlling batch file:
  465. TIMER 8p                    <Enter>
  466. \COMMAND.COM /C DOBACK      <Enter>
  467. TIMER 11p                   <Enter>
  468. \COMMAND.COM /C SALES       <Enter>
  469. TIMER 1a                    <Enter>
  470. \COMMAND.COM /C ZONE2       <Enter>
  471. ZONE3                       <Enter>
  472.  
  473. In the above example, SALES prints the sales figures for Zone 1, ZONE2 prints
  474. the sales figures for Zone 2 and ZONE3 prints the sales figures for Zone 3.
  475.  
  476.  
  477.  
  478. Reference:
  479.  
  480. The following reference section contains detailed information about the
  481. execution of each of the 2nd Shift programs.  It follows the same format
  482. notation as the DOS manual, which is:
  483.         o    You must enter any words shown in capital lettters.  These words
  484.              are known as the keywords and must be entered exactly as shown. 
  485.              You can, however, enter the keywords in any combination of
  486.              uppercase/ lowercase.  DOS will automatically convert keywords to
  487.              uppercase.
  488.         o    You must supply any items shown in lowercase letters.  For
  489.              example, you should enter the name of your file when filename is
  490.              shown in the format.
  491.         o    Items in square brackets ( [ ] ) are optional.  If you want to
  492.              include optional information, you do not need to type and should
  493.              not type the brackets, only the information within the brackets.
  494.         o    You must include all punctuation (except the square brackets
  495.              mentioned above) such as commas, equal signs, question marks,
  496.              slashes ( / ) or backslashes ( \ ) where shown.
  497.         o    A solid vertical bar ( | ) indicates a choice between two or more
  498.              entries.  At leastt one of the entries must be chosen unless the
  499.              entries are optional (if they are optional, they will be enclosed
  500.              within square brackets).  For example: ON|OFF means that you
  501.              should type either ON or OFF, without the vertical bar.
  502. Error codes returned are standard DOS ERRORLEVEL codes and may be tested from
  503. within a batch file using IF ERRORLEVEL=xx GOTO EXITxx; for example, IF
  504. ERRORLEVEL=1 GOTO EXIT1.
  505.  
  506. With all programs, entering /h or /? on the command-line (parms) signifies to
  507. the program that you want to see the help screen without executing the
  508. program.
  509.  
  510. Generally, all options may be entered in either uppercase or lowercase and in
  511. any order.  Any exceptions will be specifically noted. Reference:        2NDCONV.EXE
  512.  
  513. PURPOSE:          Converts a key text file into a binary keyfile.
  514.  
  515. USAGE:            2NDCONV [text filename] [keyfile name] [options]
  516.  
  517. SPECIAL NOTE:     At least one of the pieces of information must be entered. 
  518.                   If not, 2NDCONV assumes that you want hte help screen.  The
  519.                   first non-option entered (i.e., NOT preceded by a slash) is
  520.                   presumed to be the text filename, the second the keyfile
  521.                   name.  If a keyfile is to be specified, the text filename
  522.                   must be specified.
  523.  
  524. OPTIONS:          /h or /?  Provide brief help screen regarding usage.
  525.                   /o        Overwrite the keyfile if it exists.  If /o is not
  526.                             specified and the keyfile exists, it will not be
  527.                             overwritten.
  528.  
  529.                   text filename  is the file holding the keystrokes in text
  530.                                  form to convert to a binary keyfile format. 
  531.                                  If no text filename is specified,
  532.                                  2NDWATCH.TXT is assumed.
  533.                   keyfile name   is the output file to hold the binary
  534.                                  keystrokes after conversion.  If no keyfile
  535.                                  name is specified, 2NDWATCH.KEY is the
  536.                                  default.
  537.  
  538. ERROR CODES RETURNED:
  539.         1    Display help screen only.
  540.         2    No parameters specified.
  541.         3    Too many parameters entered.
  542.         4    Source text file name does not exist.
  543.         5    Target keyfile name exists and /o not specified.
  544. Reference:       2NDSHIFT.EXE
  545.  
  546. PURPOSE:          Plays back pre-recorded keystrokes held in keyfile, faking
  547.                   an application into thinking someone is typing at the
  548.                   keyboard.
  549.  
  550. SPECIAL NOTE:     2NDSHIFT, due to the way the keyfile is stored, will also
  551.                   play back a <PrintScreen> at the place where it was typed. 
  552.                   This may be useful for "seeing" the screen the following
  553.                   morning at any particular instance during execution.
  554.  
  555. USAGE:            2NDSHIFT [options] keyfile
  556.  
  557. OPTIONS:     /h or /?                 Provide brief help screen regarding
  558.                                       usage
  559.              /L[=][log file name]     Writes time start, program name,
  560.                                       parameters used for program, keyfile
  561.                                       name and time don to log file name.  To
  562.                                       specify output to the printer, enter PRN
  563.                                       for a log file name, as in "/L=PRN".  If
  564.                                       no default log file name is entered, a
  565.                                       default of 2NDSHIFT.LOG is used.  The
  566.                                       log file is never overwritten.  If it is
  567.                                       found, any new log information is
  568.                                       appended to it.  It is up to the user to
  569.                                       explicitly erase this file.
  570.              /T                       Show "test" results of parameters
  571.                                       entered, i.e., display the program name,
  572.                                       parameters and keyfile name as
  573.                                       interpreted by 2NDSHIFT without actually
  574.                                       executing 2NDSHIFT or the program. 
  575.                                       Useful for "debugging" the command-line
  576.                                       entry.
  577.              keyfile                  is the name of the file holding the
  578.                                       keystrokes.  Rather than use a default
  579.                                       name, you must specify a keyfile name to
  580.                                       avoide inadvertantly running any
  581.                                       particular application.
  582.  
  583. ERROR CODES RETURNED:
  584.         1    Exit with help only.
  585.         2    No parameters specified.
  586.         3    keyfile is not a valid 2nd Watch file
  587.         4    Too many parameters
  588.         6    Program to execute not found.
  589.  
  590.         Some programs, particularly WordPerfect in our testing, updates the
  591. screen only when the keyboard is inactive.  Since the keys are being "typed"
  592. at the speed of the computer, a <PrintScreen> may not necessarily show an
  593. accurate screen.  Our tests have shown that the keys are properly stored and
  594. saved using WordPerfect's Save File function.
  595.         The line drawing routines of WordPerfect lose keys, i.e., typing 16
  596. right arrows while in the line drawing routine may not necessarily draw a line
  597. 16 positions to the right.  Since 2ndShift is "typing" these keys very fast,
  598. it has been found that the line drawing routines of WordPerfect cannot take
  599. them at the speed of the computer.  If you need the lines and boxes provided
  600. with WordPerfect's line routines, create a template holding the boxes/lines
  601. necessary and use 2ndWatch to load the file with the lines already intact. Reference:2NDWATCH.EXE
  602.  
  603. PURPOSE:          Records keystrokes while an application is running and
  604.                   writes them to a binary keyfile.
  605.  
  606. SPECIAL NOTE:     At least one of the pieces of information must be entered. 
  607.                   If not, 2NDWATCH assumes that you want the help screen. 
  608.                   Generally, you may enter the option /e or /o (see below) to
  609.                   execute the program with its defaults.
  610.  
  611. As of this writing, to our knowledge, no program captures the <PrintScreen>
  612. key.  2NDWATCH does.  If you press <PrintScreen> during the execution of a
  613. program, the <PrintScreen> will be executed during play back exactly where you
  614. pressed it.  This may be useful if you want to obtain a screen dump of a
  615. particular application at any given moment.
  616.  
  617. OPTIONS:     /h or /?                 Provide brief help screen regarding
  618.                                       usage
  619.              /L[=][log file name]     Writes time start, program name,
  620.                                       parameters used for program, keyfile
  621.                                       name and time done to log file name.  To
  622.                                       specify output to the printer, enter PRN
  623.                                       for a log file name, as in "/L=PRN".  If
  624.                                       no log file name is entered, a default
  625.                                       of 2NDSHIFT.LOG is used.  The log file
  626.                                       is never overwritten.  If it is found,
  627.                                       any new log information will be appended
  628.                                       to it.  It is up to the user to
  629.                                       explicitly erase this file.
  630.              /o                       Overwrite the keyfile if it exists.  If
  631.                                       /o is not specified and the keyfile
  632.                                       exists, it will not be overwritten.
  633.              /s                       Suppress the "2nd Watch Active" message
  634.                                       and any other messages regarding the
  635.                                       operation of 2nd Watch.  Whenever
  636.                                       2ndWatch is invoked, it prints the
  637.                                       message that 2nd Watch is active unless
  638.                                       it is suppressed.  You may want to use
  639.                                       the /s option if you do not want an
  640.                                       employee or user to know that their
  641.                                       keystrokes are being recorded.
  642.              /T                       Show "test" results of parameters
  643.                                       entered, i.e., display the program name,
  644.                                       parameters and keyfile name as
  645.                                       interpreted by 2ndWatch without actually
  646.                                       executing 2ndWatch or the program. 
  647.                                       Useful for "debugging" the command-line
  648.                                       entry.
  649.              keyfile                  is the name of the file to hold the
  650.                                       keystrokes.  The default name, if none
  651.                                       is specified, is 2NDWATCH.KEY.
  652.              /e[=][program name]      name of the program to execute.  If /e
  653.                                       is specified with no program name, the
  654.                                       program will assume that you want to
  655.                                       record DOS commands.          /p[=]["]program parms["]As mentioned earlier in the
  656.                                       documentation, some programs require
  657.                                       additional information via the command-
  658.                                       line.  This is the program parms or
  659.                                       parameters.  A quote ( " ) must be used
  660.                                       if the command line parameters involve
  661.                                       either spaces or slashes ( / ).  An end-
  662.                                       quote must be used to close off the
  663.                                       command line parameters in this case. 
  664.                                       No checks are performed as to the
  665.                                       validity of the parameters as it is
  666.                                       unknown at runtime which program will be
  667.                                       executing.
  668.  
  669. ERROR CODES RETURNED:
  670.         1    Display help only.
  671.         2    No parameters specified.
  672.         3    No right quote entered (end-quote).
  673.         4    Too many parameters entered.
  674.         6    Program to execute not found.
  675.         7    Keyfile exists and not overwrite mode.
  676.  
  677. Early tests have shown that 2NDWATCH cannot properly process characters
  678. entered using the <Alt-numeric keypad> entry method.  If you don't know what
  679. this is, don't worry; this means that you've never had to have this knowledge
  680. and that this note probably doesn't apply to you. Reference:        KEYCONV.EXE
  681.  
  682. PURPOSE:          Converts a binary keyfile into human-readable text.
  683.  
  684. USAGE:            KEYCONV [keyfile name] [options]
  685.  
  686. OPTIONS:          /h or /?       Display help screen only.
  687.  
  688. keyfile name, if specified, is the keyfile holding pre-recorded keystrokes in
  689. the expected binary format.  If no keyfile is specified, the default is
  690. 2NDWATCH.KEY.
  691.  
  692. SPECIAL NOTE:     KEYCONV is the only exception to the format of the other
  693.                   programs.  If no parameters are specified, it will attempt
  694.                   to convert 2NDWATCH.KEY.  The program uses the standard
  695.                   input and standard output of DOS.  To create a text file,
  696.                   you must redirect the output, as in:
  697.                        KEYCONV keyfile name > output name, such as:
  698.                        KEYCONV 2NDWATCH.KEY > 2NDWATCH.TXT
  699.  
  700. ERROR CODES RETURNED:
  701.         1    Display help screen only.
  702.         2    Too many parameters.
  703.         3    File not a valid 2NDWATCH file, too big.
  704.         4    File not a valid 2NDWATCH file, no ID.
  705.         5    Keyfile not found.
  706. Reference:       TIMER.EXE
  707.  
  708. PURPOSE:          Provides a timing loop within batch files, making the
  709.                   computer "pause" until the specified time and/or date.
  710.  
  711. USAGE:            TIMER [/d[=]date] [/t[=]time] [/s] [/b] [/h] [/?]
  712.  
  713. SPECIAL NOTE:     At least one of the pieces of information must be entered. 
  714.                   If not, TIMER assumes that you want the help screen.
  715.  
  716. OPTIONS:     /d[=]date date is in the format of /d=01/01/90 or /dTODAY+###
  717.                        where ### is replaced by the number of days to wait
  718.                        from today.
  719.              /t[=]time time is in the format of /t=01:23:30p or /tNOW+###
  720.                        where ### is replaced by the number of seconds to wait
  721.                        from now.
  722.              /s        Show clock/timer while running (the default).
  723.              /b        Blank screen while running.  Use this when your
  724.                        computer is going to wait a long time before going to
  725.                        the next instruction to prevent screen burn-in.
  726.              /h or /?  Display brief help screen only.
  727.  
  728. ERROR CODES RETURNED:
  729.         1    Display help only.
  730.         2    Too many paramters.
  731.         3    Couldn't decipher all paramters.
  732.         4    No time specified.
  733.         5    Invalid date.
  734.         6    Invalid time.
  735. APPENDIX A: Keyfile Format
  736.  
  737. The following file format is provided for other programmers to use as needed. 
  738. It is not needed by non-programmers as KEYCONV performs all of the conversions
  739. necessary from a binary keyfile to a text file.  Transversal Design reserves
  740. the right to modify the file format at any future date without notifying any
  741. particular users.  In the event of a file format change, Transversal Design
  742. will provide utilities to convert existing keyfiles to the new format.
  743.  
  744. Bytes 1..8        ID="2ndWatch"
  745. ASCIIZ            Full program name to execute, including path
  746. ASCIIZ            Parameters to pass to program
  747. Bytes x..x+32767  Collection of keystrokes holding the character first and
  748.                   the scan code second.  This format is exactly how BIOS
  749.                   would report the key.  It is outside the scope of this
  750.                   documentation to "teach" the programmer the BIOS format of
  751.                   keystrokes.
  752.  
  753.  
  754.  
  755. APPENDIX B: Keystroke Text File Format
  756.  
  757. If desired, a text file may be created with the following conventions, then
  758. use 2NDCONV to convert the text file into the binary keyfile.  Alternately,
  759. you may record keystrokes, use KEYCONV to convert the pre-recorded keystrokes
  760. into a text file for editing, then use 2NDCONV to convert the keystrokes back
  761. to a binary keyfile.
  762.  
  763. The first line of the file must contain the literal PROGRAM:, with the colon,
  764. followed by a single space, then the full path and file name of the program to
  765. be executed, including the extension (as in .EXE, .COM or .BAT).  This line
  766. should be terminated by a carriage return/line feed (most wordprocessors
  767. insert this if you press <Enter>).  If the literal PROGRAM: is not found,
  768. 2NDCONV will assume that you intended to use DOS (COMMAND.COM).
  769.  
  770. The second line of the file must contain the literal PARMS followed by two
  771. spaces, a colon and another space, then followed by the parameters to pass to
  772. the program followed by a carriage return/line feed. PARMS must not be
  773. specified without the PROGRAM line.
  774.  
  775. Starting with the third line are the keystrokes themselves without any
  776. additional carriage returns or linefeeds.  A typable key is one which may be
  777. typed directly at the keyboard, such as the letter A or the letter P, etc. 
  778. All non-typable keys are preceded with the less-than sign ( < ) and closed off
  779. with the greater-than sign ( > ).  Because of this, the less-than sign is a
  780. "reserved" character.  If you need to "type" a less-than sign, enter two of
  781. them as in <<.  All typable keys are passed without any changes.  Special keys
  782. are keys using shift combinations (such as using the shift key, the ctrl key
  783. or the alt key), are preceded with <Shft-, <Ctrl- and <Alt- respectively and
  784. are closed off with the greater-than sign (as in <Shft-F1>, <Ctrl-F2> or <Alt-
  785. F3>).
  786.  
  787. The IBM BIOS makes a distinction between certain keys.  Although most programs
  788. treat them teh same, some do not.  The keys are:
  789.         <Ctrl-M> and <Enter>
  790.         <Ctrl-H> and <BackSpace>
  791.         <Ctrl-I> and <Tab>
  792.         Asterisk (*) above the 8 key and asterisk on the numeric keypad
  793.         Plus (+) above the equals (=) key and plus on the numeric keypad
  794.         Minus (-) (along the number row) and minus on the numeric keypad
  795. You need to be aware of this subtle distinction.  Programs such as WordPerfect
  796. use the Plus key on the numeric keypad to mean "jump to the bottom of the
  797. screen or jump down one screen if already at the bottom", versus the "regular"
  798. plus key to mean "I'm typing a plus key and want it in the document being
  799. entered".
  800.  
  801. To be safe, always execute your keyfile using 2NDSHIFT after making any
  802. changes to see if it performs as expected.
  803.  
  804. The ASCII character set allows for 256 different characters (numbered 0
  805. through 255) with 0 through 127 defined.  IBM uses all 256 characters. 
  806. Character 0 is, practically speaking, untypable.  The characters 1 to 31 are
  807. entered using a ctrl key combination with the exception of the Escape key. 
  808. Characters 32 through 126 are typable.  Characters 127 through 255 should be
  809. entered using the format <#xxx> where xxx is replaced with the character
  810. number.
  811.  
  812. Those registering their software will receive tables listing the key
  813. representations expected/produced, along with the documentation and the
  814. programs KEYCONV and 2NDCONV.
  815. MS-DOS is a registered trademark of Microsoft Corp.
  816. WordPerfect is a registered trademark of the WordPerfect Corp.
  817.  
  818. The inclusion of these product names in this documentation is no indication
  819. whatsoever that the respective companies have used or endorse any of the
  820. Transversal Design products.
  821.  
  822. Please consult the file LICENSE.DOC for additional information.
  823.  
  824.