home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / maj / 2371 / phantom.doc < prev    next >
Text File  |  1994-01-30  |  134KB  |  4,463 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                 DOS Phantom
  26.  
  27.  
  28.                                 Users Guide 
  29.  
  30.  
  31.  
  32.                            DOS Phantom V2.9 Users Guide
  33.  
  34.  
  35.  
  36.  
  37.  
  38.            PUBLISHED BY
  39.  
  40.  
  41.            P2 Enterprises
  42.            P.O. Box 25
  43.            Ben Lomond CA 95005-0025
  44.  
  45.  
  46.  
  47.            Copyright (c) 1994 by P2 Enterprises.  All Rights Reserved.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                          _______
  65.                                     ____|__     |               (tm)
  66.                                  --|       |    |-------------------
  67.                                    |   ____|__  |  Association of
  68.                                    |  |       |_|  Shareware
  69.                                    |__|   o   |    Professionals
  70.                                  -----|   |   |---------------------
  71.                                       |___|___|    MEMBER
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.                                     ii
  88.  
  89.  
  90.  
  91.                            DOS Phantom V2.9 Users Guide
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.                                  Contents
  102.  
  103.  
  104.  
  105.  
  106.         1. What Is DOS Phantom?..................................1
  107.         1.1. What is DOS Phantom Good For?.......................2
  108.         1.1.1. Recovery from Power Failures......................2
  109.         1.1.2. A Batch Substitute................................3
  110.         1.1.3. Keystroke Macros..................................3
  111.         1.1.4. Program Startup...................................3
  112.         1.1.5. Automatic Execution...............................3
  113.         1.1.6. Demos.............................................4
  114.         1.1.7. Software Testing..................................4
  115.         1.1.8. Applications Integration..........................4
  116.  
  117.         2. What is Shareware?....................................6
  118.  
  119.         3. Using DOS Phantom.....................................7
  120.         3.1. Before You Begin....................................7
  121.         3.2. The DOS Phantom Command Line........................8
  122.         3.2.1. Basic Command Switches............................8
  123.         3.2.2. Other Command Switches............................9
  124.         3.3. Recording and Playing Back.........................10
  125.         3.4. Pausing............................................11
  126.         3.5. Quick Playback - The /Q Switch.....................12
  127.         3.6. Looping Playback - The /L Switch...................12
  128.         3.7. The DOS Phantom Control Panel......................12
  129.         3.8. Changing The Hot Keys..............................14
  130.         3.9. Increasing Shell Environment Space - The /E Switch.16
  131.         3.10. Making DOS Phantom Memory Resident - The /I Switch16
  132.         3.11. Removing DOS Phantom From Memory - The /U Switch..16
  133.         3.12. Using The /O Switch...............................17
  134.         3.13. The Disk Write Trigger Value - The /T Switch......17
  135.         3.14. Autonomous Mode - the /N Switch...................18
  136.  
  137.         4. Using Hot Keys To Start Playbacks....................19
  138.  
  139.         5. Scheduling Recordings for Later Playback.............21
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.                                     iii
  147.  
  148.  
  149.  
  150.                            DOS Phantom V2.9 Users Guide
  151.  
  152.  
  153.  
  154.         6. Converting ASCII Text Files for Playback.............24
  155.  
  156.         7. The P2FLUSH Program..................................26
  157.  
  158.         8. Scraper..............................................27
  159.  
  160.         9. Editing DOS Phantom Recordings.......................30
  161.         9.1. Eliminating Help Text..............................34
  162.         9.2. DOS Phantom Directives.............................34
  163.         9.2.1. $PAUSE, $WAIT, and $SLEEP - Programmed Pauses....34
  164.         9.2.2. Ending Pauses - $ResumeKey.......................36
  165.         9.2.3. Substitution Parameters..........................36
  166.         9.2.4. Compressed Mode..................................37
  167.         9.2.5. Pop-Up Displays..................................38
  168.         9.2.6. Labels and the $GOTO Directive...................41
  169.         9.2.7. Pop-Up Menus.....................................41
  170.         9.2.8. The $IfKey Directive.............................45
  171.         9.2.9. Programmed Screen Capture........................47
  172.         9.2.10. Programmed Print Capture........................48
  173.         9.2.11. Pacing..........................................48
  174.         9.2.12. Matching Screen Text............................49
  175.         9.2.13. Waiting for Program Exit........................51
  176.         9.2.14. Detecting Exit Status...........................52
  177.         9.2.15. Disabling Keyboard Input - $DisableKybd.........53
  178.         9.2.16. Flushing the Typeahead Buffer - $FlushTypAhd....54
  179.         9.2.17. Disabling Ctl-Alt-Del...........................54
  180.         9.2.18. Programmed Reboots - $Reboot....................54
  181.         9.2.19. Retaining Keyboard Flags - $RetainKybdFlags.....54
  182.         9.2.20. Using the $SETMODE Directives...................55
  183.         9.2.21. String Variables................................56
  184.         9.2.22. Working with Files..............................57
  185.         9.2.23. Substrings - The $F Directives..................59
  186.         9.2.24. Iterated Looping - the $On Directive............61
  187.         9.2.25. Playing Music - The $Music Directive............62
  188.         9.3. Hints and Tips.....................................62
  189.         9.3.1. Interrupting Directive Execution.................62
  190.         9.3.2. Recovering Editing Sessions......................63
  191.         9.3.3. Using DOS Phantom in Batch Files.................63
  192.         9.3.4. Playback Chaining................................63
  193.         9.3.5. Don't Use the Mouse..............................63
  194.  
  195.         10. DOS Phantom Technical Information...................64
  196.         10.1. DOS Version Requirements..........................64
  197.         10.2. Memory Usage......................................64
  198.  
  199.         11. License, Warranty, Registration, and Support........65
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                                     iv
  206.  
  207.  
  208.  
  209.                            DOS Phantom V2.9 Users Guide
  210.  
  211.  
  212.  
  213.         11.1. License...........................................65
  214.         11.2. Limited Warranty..................................66
  215.         11.2.1. Government Restricted Rights....................67
  216.         11.3. Registration......................................67
  217.         11.4. Support...........................................68
  218.         11.4.1. P2 Technical Support............................68
  219.         11.4.2. The P2 Enterprises Customer Service BBS.........68
  220.         11.4.3. The ASP Ombudsman...............................69
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.                                      v
  265.  
  266.  
  267.  
  268.                            DOS Phantom V2.9 Users Guide
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.                           1. What Is DOS Phantom?
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.            DOS Phantom is a full-featured task automator and application
  291.            integration tool which can perform a large  number of functions
  292.            to make life with your computer easier and more efficient.
  293.  
  294.            DOS Phantom can be used to make a group of separate application
  295.            programs work together to perform a task automatically.
  296.  
  297.            DOS Phantom does the following:
  298.  
  299.                   o  Records and plays back keystrokes either with the
  300.                      original delays between keystrokes or at high speed.
  301.  
  302.                   o  Provides unlimited recording length (actually limited
  303.                      by the amount of available disk space).
  304.  
  305.                   o  Allows the definition of up to 16 hot keys to start
  306.                      playback of specific recordings with a single
  307.                      keystroke.
  308.  
  309.                   o  Allows scheduling of playback on a daily, weekly, or
  310.                      once-only basis. Up to 32 different scheduled events
  311.                      may be defined.
  312.  
  313.                   o  Provides the ability to edit recordings,
  314.  
  315.                   o  Provides the ability to add pop-up displays and pop-
  316.                      up menus to recordings,
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.                                      1
  324.  
  325.  
  326.  
  327.                            DOS Phantom V2.9 Users Guide
  328.  
  329.  
  330.  
  331.                   o  Provides the ability to wait during playback for a
  332.                      certain character sequence to appear on the screen,
  333.  
  334.                   o  Provides the ability to wait during playback for a
  335.                      program to exit and detect whether a success or error
  336.                      status was returned,
  337.  
  338.                   o  Captures the screen contents and writes it to a file
  339.                      at the press of a hot key or as directed by the
  340.                      contents of a recording file,
  341.  
  342.                   o  Captures output destined for the printer and writes
  343.                      it to a file (can be turned on and off from within a
  344.                      recording file),
  345.  
  346.                   o  Can read and write files from within a playback,
  347.  
  348.                   o  Can copy screen text and write it to a file,
  349.  
  350.                   o  Can copy screen text from one application and use it
  351.                      as keyboard input to another, and
  352.  
  353.                   o  Play music.
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.         1.1. What is DOS Phantom Good For?
  362.  
  363.  
  364.  
  365.         1.1.1. Recovery from Power Failures
  366.  
  367.            Because DOS Phantom writes your recorded keystrokes to the disk
  368.            after every 32 keystrokes, if you were recording when your
  369.            system failed, you can just playback the recording file,
  370.            recovering everything except perhaps the last 31 keystrokes.
  371.            This can be tremendously useful during long editing sessions,
  372.            eliminating the need to periodically save your work to avoid
  373.            losing it in a system crash.
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.                                      2
  383.  
  384.  
  385.  
  386.                            DOS Phantom V2.9 Users Guide
  387.  
  388.  
  389.  
  390.            You can even change the number of keystrokes which triggers the
  391.            write to the disk and set it as low as one keystroke, although
  392.            this can generate a inordinate amount of disk activity.
  393.  
  394.  
  395.  
  396.         1.1.2. A Batch Substitute
  397.  
  398.            DOS Phantom can be used in place of simple batch files,
  399.            eliminating the need to prepare the batch files with an editor
  400.            -- You just show DOS Phantom what you want done, and DOS
  401.            Phantom can do it for you after that. You can even edit your
  402.            DOS Phantom recordings if you make a mistake during the
  403.            recording. You can also perform parameter substitution similar
  404.            to that available with MS-DOS batch files.
  405.  
  406.  
  407.  
  408.         1.1.3. Keystroke Macros
  409.  
  410.            Using the HOTFILE program (included with DOS Phantom),
  411.            recording files can be assigned to hot keys, allowing the
  412.            entire recording to be played back with a single keystroke. Up
  413.            to 16 hotkeys can be defined. The hotkeys work even when you're
  414.            running a program.
  415.  
  416.  
  417.  
  418.         1.1.4. Program Startup
  419.  
  420.            DOS Phantom can be used to automatically supply input to
  421.            programs which expect to receive keyboard input (programs such
  422.            as spreadsheets and others). It can thus be used to perform a
  423.            sequence of "startup" commands which you would otherwise have
  424.            to type each time you run the program.
  425.  
  426.  
  427.  
  428.         1.1.5. Automatic Execution
  429.  
  430.            You might record the keystrokes to run your spreadsheet, load
  431.            current stock quotes, print a graph, and exit. You only have to
  432.            do it once; DOS Phantom can do it after that. And you can start
  433.            it all with a single keystroke!
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.                                      3
  442.  
  443.  
  444.  
  445.                            DOS Phantom V2.9 Users Guide
  446.  
  447.  
  448.  
  449.            DOS Phantom can be used to automate access to systems such as
  450.            Prodigy which normally require your presence at the keyboard.
  451.            Record the keystrokes that you use to dial Prodigy and print
  452.            headline news and current stock quotations. Then have your
  453.            computer wake up early and call Prodigy. You can have the
  454.            latest information printed and waiting for you to peruse with
  455.            your morning coffee.
  456.  
  457.  
  458.  
  459.         1.1.6. Demos
  460.  
  461.            DOS Phantom can be used to create a quick demonstration of a
  462.            program which can then be played back at will for prospective
  463.            users or customers. DOS Phantom can be paused automatically or
  464.            manually during playback for discussion or manual entry of data
  465.            to the program being demonstrated. In addition, pop-up windows
  466.            can be displayed to explain what is happening in the demo, and
  467.            menus can be presented to allow the user to guide the course of
  468.            the demo.  Automatic timeouts when user response is required
  469.            and a looping playback feature allow DOS Phantom-based demos to
  470.            run continuously and unattended and yet allow users to interact
  471.            with the demonstration if they wish.
  472.  
  473.  
  474.  
  475.         1.1.7. Software Testing
  476.  
  477.            DOS Phantom can be used to record tests of software which is
  478.            undergoing revision. Then, the tests can be run after the
  479.            revisions are complete to be sure what worked before the
  480.            revisions were done still works after the revisions. Screen
  481.            contents can be written to a file at strategic points during
  482.            the execution of the program and printer output can be captured
  483.            as well. This allows the output of the program to compared with
  484.            earlier test runs to detect differences.
  485.  
  486.  
  487.  
  488.         1.1.8. Applications Integration
  489.  
  490.            DOS Phantom can be used as the "glue" to marry a collection of
  491.            disparate programs into a complete package to solve a problem.
  492.            For example, the shareware product QuickPro Retriever uses DOS
  493.            Phantom to automatically update investment prices in Quicken (a
  494.            finance management program from Intuit) with information from
  495.  
  496.  
  497.  
  498.  
  499.  
  500.                                      4
  501.  
  502.  
  503.  
  504.                            DOS Phantom V2.9 Users Guide
  505.  
  506.  
  507.  
  508.            Prodigy's on-line stock market quote facility. DOS Phantom's
  509.            ability to search out text on the screen and verify termination
  510.            status of programs gives it a significant advantage over "blind
  511.            playback" utilities which blithely continue delivering
  512.            keystrokes even when the programs they are running have gone
  513.            awry.
  514.  
  515.            The Scraper TSR (supplied with DOS Phantom) works with DOS
  516.            Phantom to allow copying text displayed on the screen by one
  517.            program and supplying it later as input to another program. Up
  518.            to nine text strings can be be copied from the screen and
  519.            stored for later playback. Scraper allows you to select the
  520.            text and play it back while DOS Phantom is recording. Then,
  521.            when you play the Phantom recording back, Scraper goes through
  522.            the same motions. This eliminates the necessity of specifying
  523.            screen coordinates and lengths for the copy operation as is
  524.            required in some other packages.
  525.  
  526.            The strings copied from the screen by Scraper are also
  527.            available from within the Phantom playback file, so you can
  528.            write them to a file, compare them with other strings, extract
  529.            substrings from them and perform other programmatic operations
  530.            using DOS phantom's powerful script language.
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.                                      5
  560.  
  561.  
  562.  
  563.                            DOS Phantom V2.9 Users Guide
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.                            2. What is Shareware?
  578.  
  579.  
  580.  
  581.  
  582.  
  583.            Shareware distribution gives users a chance to try software
  584.            before buying it. If you try a shareware program and continue
  585.            using it, you are expected to register. Individual programs
  586.            differ on details -- some request registration while others
  587.            require it, some specify a maximum trial period. With
  588.            registration, you get anything from the simple right to
  589.            continue using the software to an updated program with printed
  590.            manual.
  591.  
  592.            Copyright laws apply to both Shareware and commercial software,
  593.            and the copyright holder retains all rights, with a few
  594.            specific exceptions as stated below. Shareware authors are
  595.            accomplished programmers, just like commercial authors, and the
  596.            programs are of comparable quality. (In both cases, there are
  597.            good programs and bad ones!) The main difference is in the
  598.            method of distribution. The author specifically grants the
  599.            right to copy and distribute the software, either to all and
  600.            sundry or to a specific group. For example, some authors
  601.            require written permission before a commercial disk vendor may
  602.            copy their Shareware.
  603.  
  604.            Shareware is a distribution method, not a type of software. You
  605.            should find software that suits your needs and pocketbook,
  606.            whether it's commercial or Shareware. The Shareware system
  607.            makes fitting your needs easier, because you can try before you
  608.            buy. And because the overhead is low, prices are low also.
  609.            Shareware has the ultimate money-back guarantee -- if you don't
  610.            use the product, you don't pay for it.
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.                                      6
  619.  
  620.  
  621.  
  622.                            DOS Phantom V2.9 Users Guide
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.                            3. Using DOS Phantom
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.         3.1. Before You Begin
  645.  
  646.            Before using DOS Phantom, we recommend that you create a
  647.            directory for your recording files and set the PHANTOMDIR
  648.            environment variable to point to it. Assuming that you want to
  649.            store your recording files in C:\PHANTOM, here is the command
  650.            to create the directory and set the PHANTOMDIR environment
  651.            variable appropriately:
  652.  
  653.  
  654.                    C:\> MKDIR PHANTOM
  655.                    C:\> SET PHANTOMDIR=C:\PHANTOM
  656.  
  657.  
  658.            You should place the second command above in your AUTOEXEC.BAT
  659.            file so that the PHANTOMDIR environment variable gets set each
  660.            time you boot your computer.
  661.  
  662.            The environment variable PHANTOMDIR is used by DOS Phantom to
  663.            determine where to place playback files and by the HOTFILE and
  664.            SCHEDULE programs to determine where to store their data files
  665.            and where to find playback files.
  666.  
  667.            Once PHANTOMDIR is defined, DOS Phantom expects to place all
  668.            recording files there. You should not include disk or directory
  669.            information in the filenames you supply DOS Phantom for
  670.            recording or playback.
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.                                      7
  678.  
  679.  
  680.  
  681.                            DOS Phantom V2.9 Users Guide
  682.  
  683.  
  684.  
  685.            You may wish to place the DOS Phantom executable files
  686.            (PHANTOM2.EXE, TXT2PTM.EXE, PTM2TXT.PTM, HOTFILE.EXE,
  687.            SCHEDULE.EXE, P2FLUSH.EXE, and SCRAPER.EXE in the same
  688.            directory. If you do this, add the PHANTOMDIR directory to the
  689.            PATH definition in your AUTOEXEC.BAT file. (You may change the
  690.            names of the .EXE files with the DOS REN command to eliminate
  691.            conflicts with names of other products' programs or just to
  692.            make them easier to type.)
  693.  
  694.            Here's how your PATH definition might appear before you add the
  695.            PHANTOM directory to it:
  696.  
  697.            PATH=C:\DOS;C:\WINDOWS;C:\
  698.  
  699.            The path consists of a list of DOS directories separated by
  700.            semicolons. When you type the name of a program at the DOS
  701.            prompt, if it can't find a file by that name in the current
  702.            directory, DOS searches the directories in the path in the
  703.            order they are listed.
  704.  
  705.            Here's how the example PATH statement above might be changed to
  706.            incorporate the PHANTOM directory:
  707.  
  708.            PATH=C:\DOS;C:\WINDOWS;C:\PHANTOM;C:\
  709.  
  710.  
  711.  
  712.         3.2. The DOS Phantom Command Line
  713.  
  714.  
  715.  
  716.         3.2.1. Basic Command Switches
  717.  
  718.            DOS Phantom accepts the following basic command line switches:
  719.  
  720.              /P      Playback
  721.  
  722.              /R      Record
  723.  
  724.              /Q      Quick Playback
  725.  
  726.              /L      Looping Playback
  727.  
  728.              /I      Install as a Memory Resident Program
  729.  
  730.              /U      Un-install DOS Phantom from memory
  731.  
  732.  
  733.  
  734.  
  735.  
  736.                                      8
  737.  
  738.  
  739.  
  740.                            DOS Phantom V2.9 Users Guide
  741.  
  742.  
  743.  
  744.            3.2.2. Other Command Switches
  745.  
  746.            In addition, the following command line switches are also
  747.            available:
  748.  
  749.              /K      Attention Hot Key Selection
  750.  
  751.              /A      Abort Hot Key Selection
  752.  
  753.              /D      Screen Capture Hot Key
  754.  
  755.              /S      Toggle Sounds
  756.  
  757.              /-S     Disable Sounds
  758.  
  759.              /M      Toggle Mode Display
  760.  
  761.              /-M     Disable Mode Display
  762.  
  763.              /C      Disable use of Color
  764.  
  765.              /O      Include Screen Output Records in Recordings
  766.  
  767.              /V      Print Capture File Specification
  768.  
  769.              /F      Screen Capture File Selection
  770.  
  771.              /E      Sets environment space in shells spawned by Phantom
  772.  
  773.              /Z      Suppresses all DOS Phantom-generated output 
  774.                      (copyright notices, etc.)
  775.  
  776.              /T      Set trigger count for disk writes when recording
  777.  
  778.              /B      Set Scraper hot key
  779.  
  780.              /N      Enable Autonomous Mode
  781.  
  782.  
  783.  
  784.            Here's an example of a DOS Phantom command to begin recording
  785.            and create the file RECORDNG.PTM:
  786.  
  787.                 PHANTOM2 /R RECORDNG.PTM
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.                                      9
  796.  
  797.  
  798.  
  799.                            DOS Phantom V2.9 Users Guide
  800.  
  801.  
  802.  
  803.            Here's the command to play back those keystrokes:
  804.  
  805.                 PHANTOM2 /P RECORDNG.PTM
  806.  
  807.  
  808.  
  809.            3.3. Recording and Playing Back
  810.  
  811.            DOS Phantom normally creates a new command shell when you start
  812.            recording. (The /I switch can be used to make DOS Phantom
  813.            install itself as a TSR instead.) DOS Phantom will record
  814.            everything you type until you exit the shell by typing EXIT at
  815.            the DOS command prompt. Here's an example of recording a DIR
  816.            command followed by a playback of the recording:
  817.  
  818.            Record the keystrokes:
  819.  
  820.  
  821.             C:\> PHANTOM2 /R RECORDNG.PTM
  822.             DOS Phantom V2.9 123456 Copyright (c) 1992...blah...blah...
  823.  
  824.             Press ALT-P to pause or resume recording.
  825.             Press ALT-P twice in succession to activate the control panel.
  826.             Type EXIT at the DOS prompt when done.
  827.  
  828.             C:\> DIR
  829.                   ...blah blah blah...
  830.             C:\> EXIT
  831.             DOS Phantom terminated.
  832.  
  833.  
  834.  
  835.            Now play them back:
  836.  
  837.  
  838.             C:\> PHANTOM2 /P RECORDING.PTM
  839.             DOS Phantom V2.9 123456 Copyright (c) 1992...blah...blah...
  840.  
  841.             Press ALT-P to pause or resume playback.
  842.             Press ALT-P twice in succession to activate the control panel.
  843.             Type EXIT at the DOS prompt when done.
  844.  
  845.             C:\> DIR
  846.                  ...blah blah blah...
  847.             C:\> EXIT
  848.             DOS Phantom terminated.
  849.  
  850.  
  851.  
  852.  
  853.  
  854.                                     10
  855.  
  856.  
  857.  
  858.                            DOS Phantom V2.9 Users Guide
  859.  
  860.  
  861.  
  862.  
  863.  
  864.            While DOS Phantom was running, it placed a small display in the
  865.            upper right corner of the screen showing what it was doing. In
  866.            the example above, the display showed either "Record" or
  867.            "Play". If you don't want the mode display, just include the /M
  868.            switch on the command line, like this:
  869.  
  870.                 C:\> PHANTOM2 /P /M RECORDNG.PTM
  871.  
  872.  
  873.  
  874.            Note that the /M switch is a "toggle", meaning that if the
  875.            feature is on it is turned off, and if it is off it is turned
  876.            on. To unconditionally set the mode display off, use /-M.
  877.  
  878.  
  879.  
  880.            3.4. Pausing
  881.  
  882.            If you press the hot key (ALT-P unless you change it with /K on
  883.            the command line) during record or playback, after a brief
  884.            delay, DOS Phantom will play a series of tones falling in pitch
  885.            to indicate its transition to PAUSE mode. The mode display, if
  886.            enabled, will change to "Pause". A second depression of the hot
  887.            key resumes the recording or playback, accompanied by a series
  888.            of rising tones indicating the transition out of PAUSE mode.
  889.  
  890.            If you are playing back, playback stops while you are in PAUSE
  891.            mode. If you are recording, the keys you press while paused are
  892.            not recorded, nor is the time which passes while in PAUSE mode
  893.            recorded.
  894.  
  895.            You can disable the sounds by including the /S switch on the
  896.            DOS Phantom command line, like this:
  897.  
  898.                 C:\> PHANTOM2 /R /S RECORDNG.PTM
  899.  
  900.  
  901.            Note that the /S switch is a "toggle", meaning that if the
  902.            feature is on it is turned off, and if it is off it is turned
  903.            on. To unconditionally set the sounds off, use /-S.
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.                                     11
  914.  
  915.  
  916.  
  917.                            DOS Phantom V2.9 Users Guide
  918.  
  919.  
  920.  
  921.            3.5. Quick Playback - The /Q Switch
  922.  
  923.            DOS Phantom normally plays back recordings at the same speed at
  924.            which they were recorded. The /Q switch forces DOS Phantom to
  925.            playback as quickly as possible. Note that some programs "eat"
  926.            characters if they are delivered too fast. DOS Phantom's
  927.            "demand playback" feature, introduced in V1.3, eliminates most
  928.            problems in this area, but some programs, notably Prodigy, may
  929.            still eat characters occasionally. For Prodigy and other
  930.            programs which still appear to eat characters, edit your
  931.            recording to use the $SetMode Func6 and $SetMode Normal
  932.            directives as described later in the section on editing DOS
  933.            Phantom recordings if you wish to use quick playback with those
  934.            programs.
  935.  
  936.            You can alter the intervals between individual keystrokes to
  937.            speed up some sections of a recording and slow down others by
  938.            editing the recording file. See the section later in this
  939.            document on editing DOS Phantom recordings for details.
  940.  
  941.  
  942.  
  943.            3.6. Looping Playback - The /L Switch
  944.  
  945.            If you supply the /L switch on the command line, DOS Phantom
  946.            will rewind when it reaches the end of the recording and play
  947.            the same recording file over and over until you pause it by
  948.            pressing the attention hot key. If DOS Phantom is memory-
  949.            resident (see below), you must close the recording file to
  950.            avoid the continuation of looping when you press the hot key
  951.            again. If DOS Phantom is not memory-resident, then you must
  952.            type EXIT at the DOS prompt.
  953.  
  954.            Looping can be a valuable tool in continuously-running
  955.            demonstrations or in stress-testing software systems. Not that
  956.            looping playback may also be accomplished using the $Goto and
  957.            $On directives in the recording file. See the section on
  958.            editing recording files for more information.
  959.  
  960.  
  961.  
  962.            3.7. The DOS Phantom Control Panel
  963.  
  964.            If you hit the hot key twice within about a half second, the
  965.            pop-up control panel is triggered, and is displayed over
  966.            whatever was already on the screen.
  967.  
  968.  
  969.  
  970.  
  971.  
  972.                                     12
  973.  
  974.  
  975.  
  976.                            DOS Phantom V2.9 Users Guide
  977.  
  978.  
  979.  
  980.            To remove the control panel without taking any action, press
  981.            the Esc key.
  982.  
  983.            Note that if your screen is in graphics mode, the screen may
  984.            not be restored to its original condition when you leave the
  985.            control panel, or the control panel may not appear at all.
  986.  
  987.            Here is what the control panel looks like:
  988.  
  989.  
  990.             +----------------------------------------------------+
  991.             |                    DOS Phantom                 V2.9|
  992.             +----------------------------------------------------+
  993.             |                                                    |
  994.             |  +---------+ +---------+ +---------+ +--------+    |
  995.             |  |         | |         | |         | |        |    |
  996.             |  | PLAY    | | QPLAY   | | RECORD  | | CLOSE  |    |
  997.             |  |         | |         | |         | |        |    |
  998.             |  +---------+ +---------+ +---------+ +--------+    |
  999.             |                                                    |
  1000.             |  Sound On   Mode Display On  Loop Mode Off         |
  1001.             |                                                    |
  1002.             |  Filename: RECORDNG.PTM                            |
  1003.             |                                                    |
  1004.             +----------------------------------------------------+
  1005.  
  1006.  
  1007.  
  1008.            You can highlight the selection of your choice using the arrow,
  1009.            tab, or spacebar keys and press RETURN to execute it or you can
  1010.            press the key corresponding to the first letter of your
  1011.            selection.
  1012.  
  1013.            If you press R, P, or Q, the menu is immediately erased, and
  1014.            DOS Phantom begins executing your command. CLOSE closes an open
  1015.            recording file. This is the only way to close a recording file
  1016.            during recording or playback when DOS Phantom is memory-
  1017.            resident (i.e., installed with the /I command line switch). The
  1018.            Sound, Mode Display, and Loop Mode selections toggle the
  1019.            sounds, mode display, and looping on and off.
  1020.  
  1021.            Selecting Filename allows you to change the recording filename.
  1022.            When you have finished entering the filename, press RETURN. To
  1023.            change an existing filename, just type over it and overwrite
  1024.            any unwanted characters with the space bar.
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.                                     13
  1032.  
  1033.  
  1034.  
  1035.                            DOS Phantom V2.9 Users Guide
  1036.  
  1037.  
  1038.  
  1039.            Pressing the ESC key erases the menu without starting a
  1040.            recording or playback session.
  1041.  
  1042.  
  1043.  
  1044.         3.8. Changing The Hot Keys
  1045.  
  1046.            There are four hot keys used by DOS Phantom. By default, two of
  1047.            them are disabled (set to the key NONE). The four hot keys are:
  1048.  
  1049.                   o  The attention hot key - This is by default set to
  1050.                      Alt-P and is used to pause and resume recordings, and
  1051.                      to cause display of the DOS Phantom control panel as
  1052.                      described earlier. The /K command line switch is used
  1053.                      to change the attention hot key to another key or to
  1054.                      disable it.
  1055.  
  1056.                   o  The screen capture hot key - This key is by default
  1057.                      disabled. When it is defined with the /D command,
  1058.                      pressing it at any time causes DOS Phantom to write a
  1059.                      copy of the screen to the file specified with the /F
  1060.                      command line switch. If no file was specified with
  1061.                      /F, the default file SCREEN.TXT is used.
  1062.  
  1063.                   o  The abort hot key - The abort hot key, when defined
  1064.                      with the /A command line switch, causes immediate
  1065.                      termination of playback. In addition, the abort key
  1066.                      is passed on to the program which is running (or the
  1067.                      DOS command processor if no program is running). This
  1068.                      is not true of the other hot keys -- they are "eaten"
  1069.                      by DOS Phantom. The most common abort hot key is
  1070.                      Ctrl-C. This allows a single keystroke to both
  1071.                      terminate playback and the program running.
  1072.  
  1073.                   o  The Scraper hot key - The Scraper hot key (by default
  1074.                      Alt-S) activates the Scraper program. See the section
  1075.                      on Scraper for information about the Scraper program.
  1076.                      The Scraper hot key is automatically disabled
  1077.                      whenever Scraper is not installed. The Scraper hot
  1078.                      key is set with the /B command line switch.
  1079.  
  1080.  
  1081.  
  1082.            Here's how you would change the attention hot key to F10:
  1083.  
  1084.                 C:\> PHANTOM2 /K=F10 /R RECORDNG.PTM
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.                                     14
  1091.  
  1092.  
  1093.  
  1094.                            DOS Phantom V2.9 Users Guide
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.            Here is a list of all the acceptable hot keys which you can
  1101.            specify with /K, /D, /A, and /B:
  1102.  
  1103.  
  1104.             SHFT-TAB    ALT-Q      ALT-W      ALT-E
  1105.             ALT-R       ALT-T      ALT-Y      ALT-U
  1106.             ALT-I       ALT-O      ALT-P      ALT-A
  1107.             ALT-S       ALT-D      ALT-F      ALT-G
  1108.             ALT-H       ALT-J      ALT-K      ALT-L
  1109.             ALT-Z       ALT-X      ALT-C      ALT-V
  1110.             ALT-B       ALT-N      ALT-M      F1
  1111.             F2          F3         F4         F5
  1112.             F6          F7         F8         F9
  1113.             F10         HOME       UP         PGUP
  1114.             LEFT        RIGHT      END        DOWN
  1115.             GDWN        INSERT     DELETE     SHFT-F1
  1116.             SHFT-F2     SHFT-F3    SHFT-F4    SHFT-F5
  1117.             SHFT-F6     SHFT-F7    SHFT-F8    SHFT-F9
  1118.             SHFT-F10    CTRL-F1    CTRL-F2    CTRL-F3
  1119.             CTRL-F4     CTRL-F5    CTRL-F6    CTRL-F7
  1120.             CTRL-F8     CTRL-F9    CTRL-F10   ALT-F1
  1121.             ALT-F2      ALT-F3     ALT-F4     ALT-F5
  1122.             ALT-F6      ALT-F7     ALT-F8     ALT-F9
  1123.             ALT-F10     CTRL-LEFT  CTRL-RIGHT CTRL-END
  1124.             CTRL-PGDWN  CTRL-HOME  ALT-1      ALT-2
  1125.             ALT-3       ALT-4      ALT-5      ALT-6
  1126.             ALT-7       ALT-8      ALT-9      ALT-0
  1127.             ALT--       ALT-=      CTRL-PGUP  CTRL-A
  1128.             CTRL-B      CTRL-C     CTRL-D     CTRL-E
  1129.             CTRL-F      CTRL-G     CTRL-H     CTRL-I
  1130.             CTRL-J      CTRL-K     CTRL-L     CTRL-M
  1131.             CTRL-N      CTRL-O     CTRL-P     CTRL-Q
  1132.             CTRL-R      CTRL-S     CTRL-T     CTRL-U
  1133.             CTRL-V      CTRL-W     CTRL-X     CTRL-Y
  1134.             CTRL-Z      ESC        F11        F12
  1135.             SHFT-F11    SHFT-F12   CTRL-F11   CTRL-F12
  1136.             ALT-F11     ALT-F12    NONE
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.                                     15
  1150.  
  1151.  
  1152.  
  1153.                            DOS Phantom V2.9 Users Guide
  1154.  
  1155.  
  1156.  
  1157.            3.9. Increasing Shell Environment Space - The /E Switch
  1158.  
  1159.            The /E command line switch is used to increase the environment
  1160.            space for the command shell spawned when DOS Phantom is not
  1161.            executed as a TSR. For example, to set the environment space to
  1162.            4096 bytes for playback of the file RECORDNG.PTM, you would use
  1163.            the following command:
  1164.  
  1165.                 PHANTOM2 /E=4096 /P RECORDNG.PTM
  1166.  
  1167.  
  1168.  
  1169.            3.10. Making DOS Phantom Memory Resident - The /I Switch
  1170.  
  1171.            If you include the /I switch on the command line, DOS Phantom
  1172.            installs itself as a TSR (Terminate and Stay Resident) program
  1173.            in memory. This method of using DOS Phantom has a number of
  1174.            benefits. Among them are lower memory utilization because no
  1175.            command shell is invoked, faster execution because no loading
  1176.            of the DOS Phantom program is required, and the ability to
  1177.            begin and end recording and playback sessions while executing
  1178.            another program.
  1179.  
  1180.            Once resident, you access DOS Phantom by pressing the hot key
  1181.            twice in succession to trigger the pop-up menu, or by issuing
  1182.            DOS Phantom commands at the DOS prompt.  If DOS Phantom is
  1183.            resident, executing Phantom commands at the DOS prompt does not
  1184.            load another copy of Phantom, even if you include the /I switch
  1185.            on the command line.
  1186.  
  1187.            You can install DOS Phantom in your AUTOEXEC.BAT file by
  1188.            including this command (assuming the directory containing
  1189.            PHANTOM2.EXE is in your PATH):
  1190.  
  1191.  
  1192.                 C:\> PHANTOM2 /I
  1193.  
  1194.  
  1195.  
  1196.  
  1197.            3.11. Removing DOS Phantom From Memory - The /U Switch
  1198.  
  1199.            The /U switch un-installs DOS Phantom from memory. When you
  1200.            execute the PHANTOM2/U command, one of two responses will be
  1201.            displayed:
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.                                     16
  1209.  
  1210.  
  1211.  
  1212.                            DOS Phantom V2.9 Users Guide
  1213.  
  1214.  
  1215.  
  1216.                   o   DOS Phantom un-installed. - This means that DOS
  1217.                       Phantom was successfully un-installed and no trace
  1218.                       of its presence remains.
  1219.  
  1220.                   o   DOS Phantom disabled. Memory not reclaimed. - This
  1221.                       means that DOS Phantom was only disabled, and is
  1222.                       dormant in memory. This is almost certainly because
  1223.                       another TSR was loaded after DOS Phantom which
  1224.                       intercepts some of the same interrupts used by DOS
  1225.                       Phantom. To remove DOS Phantom, first remove any
  1226.                       TSR's loaded after DOS Phantom, and then re-issue
  1227.                       the /U command.  In some cases, a reboot of your
  1228.                       computer may be required to remove a dormant DOS
  1229.                       Phantom.
  1230.  
  1231.  
  1232.  
  1233.            3.12. Using The /O Switch
  1234.  
  1235.            The /O command line switch causes DOS Phantom to include
  1236.            snippets of screen output in the recording file as comments.
  1237.            This is provided to aid users of the $MatchWait directive in
  1238.            creating "interactive" recordings. The use of /O significantly
  1239.            increases the size of the recording file and causes many more
  1240.            disk writes to occur during recording. Its use is discouraged
  1241.            except when you are creating a recording which you intend to
  1242.            edit to include $MatchWait directives. The only way to disable
  1243.            /O is to uninstall DOS Phantom with the /U switch if it was
  1244.            installed as a TSR or the DOS EXIT command if it wasn't.
  1245.  
  1246.            See the chapter on editing DOS Phantom recordings for
  1247.            information on the $MatchWait and related directives.
  1248.  
  1249.  
  1250.  
  1251.         3.13. The Disk Write Trigger Value - The /T Switch
  1252.  
  1253.            The command line switch /T allows you to specify a "trigger"
  1254.            value for recording file writes. Normally, DOS Phantom writes
  1255.            to the recording file after every 32 keystrokes. Using /T, you
  1256.            can specify any number of characters between 1 and 32 after
  1257.            which writes are to occur. For example, to cause the recording
  1258.            file to be updated after every character, you would include
  1259.            /T=1 on the DOS Phantom command line. Small trigger values may
  1260.            result in an undesirably large amount of disk activity.
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.                                     17
  1268.  
  1269.  
  1270.  
  1271.                            DOS Phantom V2.9 Users Guide
  1272.  
  1273.  
  1274.  
  1275.         3.14. Autonomous Mode - the /N Switch
  1276.  
  1277.            The command line switch /N places DOS Phantom in autonomous
  1278.            mode. When in autonomous mode, DOS Phantom ignores commands
  1279.            issued using the PHANTOM2.EXE program and hot keys defined
  1280.            using HOTFILE. Scheduled playbacks defined with SCHEDULE are
  1281.            honored if recording or playback is not in progress at the
  1282.            scheduled time.
  1283.  
  1284.            The following command line installs DOS Phantom in memory,
  1285.            disables the attention hot key, the mode display, and sounds,
  1286.            begins recording into the file KEYSTROK.LOG, and places DOS
  1287.            Phantom in autonomous mode. Once this is done, DOS Phantom may
  1288.            not be removed from memory using PHANTOM2 and recording cannot
  1289.            be stopped. In addition, there is no visible or audible
  1290.            indication that DOS Phantom is resident and active.
  1291.  
  1292.  
  1293.                C:\> PHANTOM2 /R/N/S/M/K=NONE/I KEYSTROK.LOG
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.                                     18
  1327.  
  1328.  
  1329.  
  1330.                            DOS Phantom V2.9 Users Guide
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.                    4. Using Hot Keys To Start Playbacks
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.            You can assign hot keys to recording files using the HOTFILE
  1351.            program. Once a hot key is assigned to a recording file,
  1352.            pressing the hot key starts playback of the file, even if you
  1353.            are running another program at the time. Of course, DOS Phantom
  1354.            must be installed at the time you press the hot key.
  1355.  
  1356.            The HOTFILE program accepts four commands: ASSIGN, LIST,
  1357.            DELETE, and KEYS.
  1358.  
  1359.            The ASSIGN command lets you assign a hot key to a file. The
  1360.            file must reside in the directory defined by the environment
  1361.            variable PHANTOMDIR. Here's an example assigning the hot key
  1362.            CTRL-B to the recording file BACKUP.PTM:
  1363.  
  1364.  
  1365.             C:\> HOTFILE ASSIGN CTRL-B BACKUP.PTM
  1366.  
  1367.  
  1368.            The LIST command displays a list of the currently defined hot
  1369.            keys and their associated playback files. Here's an example of
  1370.            the LIST command:
  1371.  
  1372.             C:\> HOTFILE LIST
  1373.             HOTFILE V2.9 123456 Copyright (c) blah, blah, blah...
  1374.  
  1375.             No  Hotkey    Playback file
  1376.             --------------------------------
  1377.              1  ALT-F10   MAIL.PTM
  1378.              2  CTRL-B    BACKUP.PTM
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.                                     19
  1386.  
  1387.  
  1388.  
  1389.                            DOS Phantom V2.9 Users Guide
  1390.  
  1391.  
  1392.  
  1393.            You can delete a hot key assignment with the DELETE command
  1394.            like this:
  1395.  
  1396.             C:\> HOTFILE DELETE CTRL-B
  1397.             HOTFILE V2.9 123456 Copyright (c) blah, blah, blah...
  1398.  
  1399.             Delete assignment of CTRL-B to file BACKUP.PTM (Y)? y
  1400.             C:\>
  1401.  
  1402.  
  1403.            The KEYS command displays a list of the hot keys you can use
  1404.            with HOTFILE. If you type HOTFILE without a command, a help
  1405.            screen is displayed.
  1406.  
  1407.            After you make changes to the hot key assignments, you do not
  1408.            need to unload and reload DOS Phantom in order for the hot keys
  1409.            to become usable. If DOS Phantom is already installed in memory
  1410.            when HOTFILE is run, HOTFILE communicates the changes to DOS
  1411.            Phantom automatically.
  1412.  
  1413.            A maximum of 16 hot key assignments may be made.
  1414.  
  1415.            All of the commands may be abbreviated to a single character.
  1416.  
  1417.            The hot key assignments are stored in a file called HOTKEYS.DAT
  1418.            in the PHANTOMDIR directory. You should not attempt to modify
  1419.            this file using any program other than HOTFILE. If you delete
  1420.            this file, all your hot key assignments will be lost.
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.                                     20
  1445.  
  1446.  
  1447.  
  1448.                            DOS Phantom V2.9 Users Guide
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.                 5. Scheduling Recordings for Later Playback
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.            The SCHEDULE program allows you to maintain a schedule of
  1469.            playbacks. Up to 32 schedule items may be created. Playbacks
  1470.            may be scheduled on a daily, weekly, or once-only basis. The
  1471.            SCHEDULE program accepts commands similar to those of the
  1472.            HOTFILE program: ASSIGN, LIST, and DELETE.
  1473.  
  1474.            The ASSIGN command assigns a playback time to a playback file.
  1475.            (The file must be present in the directory defined by the
  1476.            environment variable PHANTOMDIR.) Here are some examples of the
  1477.            ASSIGN command:
  1478.  
  1479.            Play REMINDER.PTM every day at 11:30 am:
  1480.  
  1481.             C:\> SCHEDULE ASSIGN 11:30 REMINDER.PTM
  1482.  
  1483.  
  1484.  
  1485.            Play WKLYBKUP.PTM every Friday at 10:00 pm:
  1486.  
  1487.             C:\> SCHEDULE ASSIGN Fri-22:00 WKLYBKUP.PTM
  1488.  
  1489.  
  1490.  
  1491.            Play GETMAIL.PTM at 3:00 pm on September 20, 1993:
  1492.  
  1493.  
  1494.             C:\> SCHEDULE ASSIGN 9/20/93-15:00 GETMAIL.PTM
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.                                     21
  1504.  
  1505.  
  1506.  
  1507.                            DOS Phantom V2.9 Users Guide
  1508.  
  1509.  
  1510.  
  1511.            Note that the times use a 24-hour clock and that the dash is
  1512.            required between the day of the week or the date and the time.
  1513.            Here are the abbreviations for the days of the week which
  1514.            SCHEDULE recognizes:
  1515.  
  1516.  
  1517.  
  1518.                 Sun Mon Tue Wed Thu Fri Sat
  1519.  
  1520.  
  1521.  
  1522.            Here are the pm hours of the 24-hour clock:
  1523.  
  1524.             noon 12    3pm 15    6pm 18    9pm  21    midnight 00
  1525.             1pm  13    4pm 16    7pm 19    10pm 22    1am       1
  1526.             2pm  14    5pm 17    8pm 20    11pm 23    2am       2
  1527.  
  1528.  
  1529.  
  1530.            The LIST command displays a list of the current schedule. Here
  1531.            is an example of the LIST command:
  1532.  
  1533.  
  1534.             C:\> SCHEDULE LIST
  1535.             SCHEDULE V2.9 922300 Copyright (c) 1992 blah, blah, blah...
  1536.  
  1537.             No  When           Playback file
  1538.             ------------------------------------
  1539.              1  11:30          REMINDER.PTM
  1540.              2  Fri-22:00      WKLYBKUP.PTM
  1541.              3  9/20/93-15:00  GETMAIL.PTM
  1542.  
  1543.  
  1544.  
  1545.            To remove an item from the schedule, use SCHEDULE's DELETE
  1546.            command,  specifying the date and time of the item to remove,
  1547.            like this:
  1548.  
  1549.  
  1550.                 C:\> SCHEDULE DELETE Fri-22:00
  1551.  
  1552.  
  1553.            After you make changes to the schedule, you do not need to
  1554.            unload and reload DOS Phantom in order for the changes to
  1555.            become effective. If DOS Phantom is already installed in memory
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.                                     22
  1563.  
  1564.  
  1565.  
  1566.                            DOS Phantom V2.9 Users Guide
  1567.  
  1568.  
  1569.  
  1570.            when SCHEDULE is run, SCHEDULE communicates the changes to DOS
  1571.            Phantom automatically.
  1572.  
  1573.            All of the commands may be abbreviated to a single character.
  1574.  
  1575.            The schedule information is stored in a file called
  1576.            SCHEDULE.DAT in the PHANTOMDIR directory. You should not
  1577.            attempt to modify this file using any program other than
  1578.            SCHEDULE. If you delete this file, the entire schedule will be
  1579.            lost.
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.                                     23
  1622.  
  1623.  
  1624.  
  1625.                            DOS Phantom V2.9 Users Guide
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.                 6. Converting ASCII Text Files for Playback
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.            The program MAKEPTM accepts as input any ASCII text file and
  1646.            produces as output a DOS Phantom recording file which, when
  1647.            played back, makes it appear as if the contents of the ASCII
  1648.            text file were being typed in at the keyboard.
  1649.  
  1650.            MAKEPTM allows you to specify the delay in milliseconds between
  1651.            successive characters and the delay in seconds between
  1652.            successive lines of text. If you leave off the delay times,
  1653.            delays of zero are used.
  1654.  
  1655.            Here are some examples of MAKEPTM:
  1656.  
  1657.            Convert LETTER.TXT to LETTER.PTM:
  1658.  
  1659.  
  1660.                    C:\> MAKEPTM LETTER.TXT LETTER.PTM
  1661.  
  1662.  
  1663.  
  1664.            Convert LETTER.TXT to LETTER.PTM with 100 ms delay between
  1665.            characters:
  1666.  
  1667.  
  1668.                 C:\>MAKEPTM LETTER.TXT LETTER.PTM 100
  1669.  
  1670.  
  1671.  
  1672.            Convert LETTER.TXT to LETTER.PTM with 100 ms delay between
  1673.            characters and 2 seconds between lines:
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.                                     24
  1681.  
  1682.  
  1683.  
  1684.                            DOS Phantom V2.9 Users Guide
  1685.  
  1686.  
  1687.  
  1688.                 C:\>MAKEPTM LETTER.TXT LETTER.PTM 100 2
  1689.  
  1690.  
  1691.            Convert LETTER.TXT to LETTER.PTM with no delay between
  1692.            characters, but a 2 second delay between lines:
  1693.  
  1694.                 C:\>MAKEPTM LETTER.TXT LETTER.PTM 0 2
  1695.  
  1696.  
  1697.  
  1698.            The output file can be played back like any DOS Phantom
  1699.            recording.
  1700.  
  1701.                 NOTE: When a character delay has been specified, it is not
  1702.                 possible to interrupt playback with the attention hot key.
  1703.  
  1704.            MAKEPTM places its output file in the directory designated by
  1705.            the DOS environment variable PHANTOMDIR if it has been defined.
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.                                     25
  1740.  
  1741.  
  1742.  
  1743.                            DOS Phantom V2.9 Users Guide
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.                           7. The P2FLUSH Program
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.            The P2FLUSH program, when executed, causes DOS Phantom to flush
  1764.            the record buffer to disk, even if the number of characters
  1765.            which would normally trigger a disk write has not yet been
  1766.            accumulated. P2FLUSH is effective even when DOS Phantom is
  1767.            operating in autonomous mode.
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.                                     26
  1799.  
  1800.  
  1801.  
  1802.                            DOS Phantom V2.9 Users Guide
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.                                 8. Scraper
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.            V2.9 includes the SCRAPER utility which allows you to copy text
  1823.            displayed by a program into Phantom's string variables and play
  1824.            the stored text back later as if it were keyboard input.
  1825.            Scraper actions can be recorded with DOS Phantom and played
  1826.            back later for automatic movement of data from one program into
  1827.            another. This capability dramatically increases DOS Phantom's
  1828.            usefulness for application integration.
  1829.  
  1830.            Scraper is activated with the hot key specified using DOS
  1831.            Phantom's /B command line switch. The default Scraper
  1832.            activation hot key is ALT-S. Here is the command to install DOS
  1833.            Phantom and set the Scraper hot key to F12:
  1834.  
  1835.                 C:\> PHANTOM2 /I /B=F12
  1836.  
  1837.  
  1838.  
  1839.            Scraper is named as it is for the slang term "screen scraping"
  1840.            commonly used to describe Scraper's function of "scraping" the
  1841.            text from the screen for later use.
  1842.  
  1843.            Install Scraper by typing
  1844.  
  1845.  
  1846.                 SCRAPER /I
  1847.  
  1848.  
  1849.            at the DOS command line. DOS Phantom must be installed before
  1850.            Scraper can be installed.
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.                                     27
  1858.  
  1859.  
  1860.  
  1861.                            DOS Phantom V2.9 Users Guide
  1862.  
  1863.  
  1864.  
  1865.            Activate Scraper using the hot key (default ALT-S). A pop-up
  1866.            help window is displayed which tells you to move the cursor
  1867.            using the arrow keys to the upper left corner of the text you
  1868.            wish to select and then to press Enter. As soon as you press an
  1869.            arrow key, the help window disappears.
  1870.  
  1871.            When you press Enter after moving the cursor to the desired
  1872.            location, a second pop-up help window appears, telling you to
  1873.            move the cursor to the lower right of the text you wish to
  1874.            select and then to press the number key (1-9) where you want to
  1875.            begin storing the selected text. The text will be stored in the
  1876.            DOS Phantom string variables beginning with that number.
  1877.  
  1878.            If only one line of text was selected, only the one string
  1879.            variable will be used.  If, for example, you selected three
  1880.            lines of text and pressed the number 4, the string variables 4,
  1881.            5, and 6 would receive the first, second, and third lines of
  1882.            selected text, respectively. The contents of the string
  1883.            variables, if any, are overwritten. (There are a total of nine
  1884.            Phantom string variables numbered 1-9.)
  1885.  
  1886.            To play back the contents of a string variable, invoke Scraper
  1887.            using the hot key and press the number key (1-9) of the string
  1888.            variable whose contents you wish to play.
  1889.  
  1890.            You can play back the contents of string variables which
  1891.            received their contents in ways other than via Scraper as well.
  1892.            For example, a playback file might load the string variables
  1893.            with data for later insertion into a program through the manual
  1894.            use of Scraper.  Also, you can use the contents of string
  1895.            variables loaded with Scraper in your Phantom scripts. (See the
  1896.            section on string variables in the chapter on editing Phantom
  1897.            recordings for more information.)
  1898.  
  1899.            To disable the pop-up help windows, install Scraper with the /H
  1900.            switch like this:
  1901.  
  1902.                 C:\> SCRAPER/H/I
  1903.  
  1904.  
  1905.            You may un-install scraper using the /U switch. Also, when you
  1906.            un-install DOS Phantom, Scraper will be automatically
  1907.            uninstalled.
  1908.  
  1909.            The /Z switch will cause Scraper to install and uninstall
  1910.            "quietly" without displaying its copyright notice.
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.                                     28
  1917.  
  1918.  
  1919.  
  1920.                            DOS Phantom V2.9 Users Guide
  1921.  
  1922.  
  1923.  
  1924.            If you record your use of Scraper with DOS Phantom, it will be
  1925.            played back correctly, allowing you to automate the movement of
  1926.            data from one program into another (or even back into the same
  1927.            program).
  1928.  
  1929.            Scraper uses about 6K bytes of memory with help enabled, and
  1930.            about 3K bytes with help disabled.
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.                                     29
  1976.  
  1977.  
  1978.  
  1979.                            DOS Phantom V2.9 Users Guide
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.                      9. Editing DOS Phantom Recordings
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.            The program PTM2TXT extracts information from a DOS Phantom
  2000.            recording and places it in a text file for editing. Here is an
  2001.            example of PTM2TXT:
  2002.  
  2003.                 C:\>PTM2TXT RECORDNG.PTM RECORDNG.TXT
  2004.  
  2005.  
  2006.  
  2007.            The output text file contains a header with a summary of DOS
  2008.            Phantom script language syntax and directives.  It looks like
  2009.            this:
  2010.  
  2011.  
  2012.   !============================================================================
  2013.   ! DOS Phantom V2.9
  2014.   !
  2015.   ! Text translation of recording file hotmenu.
  2016.   ! Translated by PTM2TXT V2.9 #EVAL00.
  2017.   !
  2018.   ! Line format:
  2019.   !     mm:ss.ttt keystroke   eeaa ff
  2020.   !
  2021.   !     mm:ss:ttt = time interval between the previous keystroke and
  2022.   !                 this one.
  2023.   !         mm    = minutes
  2024.   !         ss    = seconds
  2025.   !         ttt   = thousandths of seconds
  2026.   !     ee        = extended keycode       (optional)
  2027.   !     aa        = ASCII code             (optional)
  2028.   !     ff        = keyboard status flags  (optional)
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.                                     30
  2035.  
  2036.  
  2037.  
  2038.                            DOS Phantom V2.9 Users Guide
  2039.  
  2040.  
  2041.  
  2042.   !
  2043.   !     The optional fields need not be entered when editing this file.
  2044.   !     Values appropriate for most circumstances will be provided for
  2045.   !     you by TXT2PTM.  If you include values for the optional fields,
  2046.   !     Your values will override those which TXT2PTM would provide.
  2047.   !     You should delete the optional fields when changing the keystroke.
  2048.   !
  2049.   !     Comment lines (lines beginning with !) and empty lines are ignored
  2050.   !     by the TXT2PTM translator.
  2051.   !
  2052.   !     Lines beginning with an asterisk (*) are processed by TXT2PTM
  2053.   !     without timing information.  This allows you to place entire
  2054.   !     commands on one line rather than one character per line. A
  2055.   !     carriage return is automatically placed at the end of * lines
  2056.   !     by TXT2PTM unless the last character on the line is a dollar
  2057.   !     sign.  Special character expressions (e.g., <Ctrl-K>) are
  2058.   !     delimited with angle brackets (<,>).
  2059.   !
  2060.   !     DOS Phantom directives begin with a dollar sign ($).
  2061.   !     Directives supported by DOS Phantom V2.9 are:
  2062.   !
  2063.   !       $n                     Input parameters (n=1-9)
  2064.   !       $Sn                    String varaibles (n=1-9)
  2065.   !       $Pause [n]             n=secs, default is no auto resume
  2066.   !       $Wait mm:ss.ttt        mm=min, ss=secs, ttt=ms
  2067.   !       $Sleep [n]             n=secs, default is no auto resume
  2068.   !       $ResumeKey [key]...    Key to resume Paused condition
  2069.   !       $IfKey <label> <key>   If last key was <key>, branch to <label>
  2070.   !
  2071.   !       $BeginDisplay row col attr timo S|R
  2072.   !       $Title text            Display title (optional)
  2073.   !       <text>                 Text for pop-up display
  2074.   !       <text>                 More text lines...
  2075.   !       $EndDisplay            Display text between Begin and EndDisplay
  2076.   !
  2077.   !       $BeginMenu row col attr timo S|R incr
  2078.   !       $Title text            Menu title (optional)
  2079.   !       <lines of text>        Static (non-selectable) menu text
  2080.   !       $<label> itemtext      Go to <label> when item is selected.
  2081.   !       $<label> itemtext      More menu items...
  2082.   !       $EndMenu               Ends a menu definition
  2083.   !
  2084.   !       $Goto <label>          Continue execution at <label>
  2085.   !       $<label>:              Goto, Menu, or If target
  2086.   !       $ExitWait [n]          Wait n secs for program exit
  2087.   !       $IfSuccess <label>     Go to <label> if exit status = 0
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.                                     31
  2094.  
  2095.  
  2096.  
  2097.                            DOS Phantom V2.9 Users Guide
  2098.  
  2099.  
  2100.  
  2101.   !       $IfError               Go to <label> if exit status <> 0
  2102.   !       $IfExitCode n <label>  Go to <label> if exit status = n
  2103.   !       $MatchWait n text      Wait n secs for text to appear on screen
  2104.   !       $MatchAt r,c n text    Wait n secs for text at position r,c
  2105.   !       $MatchFrom r,c n text  Wait n secs for text after position r,c
  2106.   !       $MatchTo r,c n text    Wait n secs for text before position r,c
  2107.   !       $IfMatch <label>       Go to <label> if match found
  2108.   !       $IfTimeout <label>     Go to <label> if no match found
  2109.   !       $Screen "text" [file]  Write screen to file prefixed with text
  2110.   !       $Printer C [file]      Capture printer output in file
  2111.   !       $Printer N             Return to normal printer output
  2112.   !       $RetainKybdFlags       Restore Insert, NumLock, ScrollLock, CapsLock
  2113.   !       $DisableCtrlAltDel     Ignore reboot requests from the keyboard
  2114.   !       $EnableCtrlAltDel      Honor reboot requests from the keyboard
  2115.   !       $Reboot                Reboot the computer
  2116.   !       $DisableKybd           Ignore keyboard input
  2117.   !       $EnableKybd            Stop ignoring keyboard input
  2118.   !       $FlushTypAhd           Clear keyboard typeahead buffer
  2119.   !       $Assign Sn text        Assign text to variable
  2120.   !       $Get r,c len Sn        Read text from screen into variable
  2121.   !       $IfEqual label Sn text Branch if Sn equal to text
  2122.   !       $IfEmpty label Sn      Branch if variable Sn is empty
  2123.   !       $Clear Sn              Clear variable Sn
  2124.   !       $FirstFile Sn text     Find first file matching text
  2125.   !       $NextFile Sn           Find next file matching FirstFile text
  2126.   !       $On count label        Branch to label the count'th time
  2127.   !       $Read file Sn          Read one line from file into Sn
  2128.   !       $Write file text[$]    Write text to file, $=no newline
  2129.   !       $Close                 Close file open for reading
  2130.   !       $IfClosed label        Branch if read file is closed
  2131.   !       $FSubStr(Sn,start,end) Return substring
  2132.   !       $FBefore(Sn,char)      Return substring before char
  2133.   !       $FAfter(Sn,char)       Return substring after char
  2134.   !       $Music note/dur...     Play note for duration dur
  2135.   !       $Scraper               Invoke Scraper
  2136.   !
  2137.   !     See the DOS Phantom Users Guide for details on using these directives.
  2138.   !
  2139.   !     The special characters $, <, and > must be preceeded by a
  2140.   !     dollar sign ($) when they are present in an asterisk line.
  2141.   !     Otherwise TXT2PTM will attempt to perform special processing
  2142.   !     erroneously.
  2143.   !
  2144.   !============================================================================
  2145.  
  2146.   00:06.050 D            2044 60
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.                                     32
  2153.  
  2154.  
  2155.  
  2156.                            DOS Phantom V2.9 Users Guide
  2157.  
  2158.  
  2159.  
  2160.   00:00.165 I            1749 60
  2161.   00:00.220 R            1352 60
  2162.   00:00.770 /            352f 60
  2163.   00:00.330 W            1157 60
  2164.   00:00.440 <SP>         3920 60
  2165.   $1
  2166.   00:01.210 <CR>         1c0d 60
  2167.   00:01.210 <CR>         1c0d 60
  2168.   $Pause
  2169.   00:01.760 E            1245 60
  2170.   00:00.275 X            2d58 60
  2171.   00:00.440 I            1749 60
  2172.   00:00.330 T            1454 60
  2173.   00:00.330 <CR>         1c0d 60
  2174.  
  2175.            The above file depicts a recording of the commands "DIR/W" and
  2176.            "EXIT". As you can see, the carriage return character is
  2177.            translated to <CR> in the file. Spaces are translated as <SP>.
  2178.            Non-printing and special characters such as CTRL-K are all
  2179.            translated in this manner. If you are not sure what the
  2180.            translation of a character might be, it is best to make a
  2181.            recording containing the character and then translate the
  2182.            recording with PTM2TXT to find out what the correct translation
  2183.            is.
  2184.  
  2185.            The line format is as described in the output file shown above.
  2186.  
  2187.            IMPORTANT: If you change a line in the file, it is best, unless
  2188.            you clearly understand the BIOS extended keycodes and keyboard
  2189.            status flags, to remove the eeaa and ff fields. TXT2PTM will
  2190.            supply appropriate values when you leave them out.
  2191.  
  2192.            Note that if you edit a translated DOS Phantom recording file
  2193.            and insert comments and labels, then translate the text file to
  2194.            a recording file and back into a text file, the comments and
  2195.            labels will be lost. PTM2TXT will create labels required by the
  2196.            menu and goto directives in the recording, but they will not be
  2197.            the labels from your original edited text file. Goto and menu
  2198.            directives are discussed below.
  2199.  
  2200.            When you have finished editing, you can create a recording file
  2201.            using the TXT2PTM program like this:
  2202.  
  2203.  
  2204.                 C:\> TXT2PTM RECORDNG.TXT RECORDNG.PTM
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.                                     33
  2212.  
  2213.  
  2214.  
  2215.                            DOS Phantom V2.9 Users Guide
  2216.  
  2217.  
  2218.  
  2219.            9.1. Eliminating Help Text
  2220.  
  2221.            If you don't want the detailed help header in the PTM2TXT
  2222.            output file, you can specify the /H switch on the command line.
  2223.            This will cause a brief header to be prefixed to the
  2224.            translation rather than the detailed help text shown in the
  2225.            above example. For example:
  2226.  
  2227.                 C:\>PTM2TXT /H RECORDNG.PTM RECORDNG.TXT
  2228.  
  2229.  
  2230.  
  2231.            Note that the switches to the PTM2TXT command must be separated
  2232.            from the PTM2TXT command and other switches by spaces.
  2233.  
  2234.  
  2235.  
  2236.         9.2. DOS Phantom Directives
  2237.  
  2238.            DOS Phantom directives are directions to DOS Phantom that you
  2239.            insert into a recording to have DOS Phantom perform some action
  2240.            during playback. All directives begin with a $. With the
  2241.            exception of the $1-$9, $S1-$S9, and the $F directives, all
  2242.            directives must be the first non-blank word on a line. Each
  2243.            directive is discussed in detail below.
  2244.  
  2245.  
  2246.  
  2247.            9.2.1. $PAUSE, $WAIT, and $SLEEP - Programmed Pauses
  2248.  
  2249.            The example above contains a programmed pause directive after
  2250.            the second <CR>. Note that programmed pauses (i.e., pauses
  2251.            which occur automatically at predetermined points during
  2252.            playback) may only be created by preparing an input file for
  2253.            TXT2PTM such as that shown above. There is no way to create
  2254.            programmed pauses while recording. The pause directive may be
  2255.            followed by a timeout value expressed in seconds (up to 3600
  2256.            seconds). If the timeout period passes without a key being
  2257.            depressed, the pause is ended and playback resumes. Each time a
  2258.            key is pressed during the pause, the pause timer is restarted.
  2259.  
  2260.            The $Sleep directive behaves much as the $Pause directive in
  2261.            that playback is suspended for the period of seconds supplied
  2262.            as a parameter to $Sleep.  The difference is that the timer
  2263.            used by $Sleep is not reset on each keystroke, so when the
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.                                     34
  2271.  
  2272.  
  2273.  
  2274.                            DOS Phantom V2.9 Users Guide
  2275.  
  2276.  
  2277.  
  2278.            timeout period has elapsed, playback continues regardless of
  2279.            whether a key has been pressed in the meantime.
  2280.  
  2281.            The number of seconds to pause is a required parameter of
  2282.            $Sleep and it must be in the range of 1 to 3600 (1 hour).  If
  2283.            you wish to pause indefinitely, you must use $Pause.
  2284.  
  2285.            As is the case with $Pause, if you need a $Sleep timeout of
  2286.            greater then 3600 seconds, you can place a series of $Sleep
  2287.            statements in your Phantom script which add up to the total
  2288.            time required.
  2289.  
  2290.            The $Wait directive is also available. $Wait accepts the time
  2291.            to wait in mm:ss.ttt format instead of in seconds like $Pause.
  2292.            $Wait cannot be terminated by pressing a key as can $Pause, and
  2293.            unlike $Pause the playback clock continues to run during a
  2294.            $Wait. This can cause the characters following a $Wait to be
  2295.            played back as fast as possible until the playback catches up
  2296.            (makes up for the time lost in the $Wait). $Wait directives are
  2297.            most useful in recordings which are meant to be played back at
  2298.            high speed (e.g., files prepared in compressed mode, described
  2299.            later), but where pauses without allowing keyboard input are
  2300.            required.
  2301.  
  2302.            To create the effect of a $Wait in a file with timed keystrokes
  2303.            without losing time during the wait, just add time to the
  2304.            keystroke which follows the wait.
  2305.  
  2306.            Here is a $Wait which will cause a wait of 3 minutes and 10
  2307.            seconds (this will cause timed keystrokes following to be
  2308.            played back at high speed until the 3 minutes and 10 seconds
  2309.            are made up for):
  2310.  
  2311.  
  2312.                 $Wait 03:10.000
  2313.  
  2314.  
  2315.  
  2316.            Here is a keystroke which will not be played back until 3
  2317.            minutes and 10 seconds have passed (no speedup of succeeding
  2318.            keystrokes occurs):
  2319.  
  2320.                 03:10.000 <CR>
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.                                     35
  2330.  
  2331.  
  2332.  
  2333.                            DOS Phantom V2.9 Users Guide
  2334.  
  2335.  
  2336.  
  2337.            In general, you use $Pause to pause for keyboard input, and
  2338.            $Wait in compressed recordings to stall without keyboard input.
  2339.  
  2340.  
  2341.  
  2342.            9.2.2. Ending Pauses - $ResumeKey
  2343.  
  2344.            Normally, $Pause and $Sleep are terminated only when the
  2345.            timeout period has expired or when you use the attention key.
  2346.            The $ResumeKey directive allows you to specify other keys which
  2347.            can be used to end the pause and resume playback.  Here is an
  2348.            example of $ResumeKey being used to allow the F12, Alt-F12, or
  2349.            Ctrl-F12 keys to end the pause:
  2350.  
  2351.                 $ResumeKey <F12> <Alt-F12> <Ctrl-F12>
  2352.                 $Pause
  2353.  
  2354.            The key list contains the names of keys separated with a single
  2355.            space.  These "resume keys" remain in effect until you change
  2356.            them with another $ResumeKey directive or until you cancel them
  2357.            using a $ResumeKey directive with no arguments.
  2358.  
  2359.            The special "$ResumeKey Any" directive can be used to allow any
  2360.            keystroke to end the pause.  Unlike other resume key
  2361.            assignments, the $ResumeKey Any is cancelled automatically as
  2362.            soon as it is used to terminate a $Pause or $Sleep.
  2363.  
  2364.            See the description of the $IfKey directive for information on
  2365.            how to determine which resume key was used to end a pause.
  2366.  
  2367.  
  2368.  
  2369.            9.2.3. Substitution Parameters
  2370.  
  2371.            The example also contains a substitution parameter directive:
  2372.            $1. This directive causes the first parameter entered on the
  2373.            DOS Phantom command line after the filename to be substituted
  2374.            for the $1 during playback. Up to nine substitution parameters
  2375.            ($1, $2, $3, ..., $9) may be used. If a corresponding command
  2376.            line parameter is not supplied for playback, the parameter used
  2377.            on the previous playback is used. If no parameter was used on
  2378.            the previous playback, or if this is the first playback of this
  2379.            DOS Phantom session, nothing is substituted for the
  2380.            substitution parameter (i.e., it is as if it was not there).
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386.  
  2387.  
  2388.                                     36
  2389.  
  2390.  
  2391.  
  2392.                            DOS Phantom V2.9 Users Guide
  2393.  
  2394.  
  2395.  
  2396.            Multiple substitution parameter directives may be placed in an
  2397.            asterisk line. Otherwise, only a single directive is allowed
  2398.            per line. Asterisk lines and compressed mode are discussed in
  2399.            the next section.
  2400.  
  2401.            If you have placed substitution parameter directives in your
  2402.            recording file you may pass the values to be substituted for
  2403.            them on the command line after the filename. Here is an example
  2404.            passing the parameters A:, XYZ, and BOOBOO:
  2405.  
  2406.  
  2407.                 C:\>PHANTOM2/Q/I/K=F1 RECORDNG.PTM A: XYZ BOOBOO
  2408.  
  2409.  
  2410.            A: is substituted for $1, XYZ for $2, and BOOBOO for $3.
  2411.  
  2412.  
  2413.  
  2414.            9.2.4. Compressed Mode
  2415.  
  2416.            You may avoid typing in the time fields (mm:ss.ttt) by starting
  2417.            lines with an asterisk. Lines starting with an asterisk are
  2418.            referred to as being in "compressed" mode. When TXT2PTM
  2419.            processes lines beginning with an asterisk, it behaves as if
  2420.            each character was on a separate line and preceded with
  2421.            "00:00.000". TXT2PTM automatically inserts a <CR> at the end of
  2422.            each * line. You can suppress the automatically added <CR> by
  2423.            ending the asterisk line with a $.
  2424.  
  2425.            Here is the previous example created using this technique:
  2426.  
  2427.  
  2428.              !
  2429.              ! Example of the use of * lines.
  2430.              !
  2431.  
  2432.              * DIR/W $1
  2433.              *
  2434.              $Pause
  2435.              * EXIT
  2436.  
  2437.              !
  2438.              ! End of example
  2439.              !
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.                                     37
  2448.  
  2449.  
  2450.  
  2451.                            DOS Phantom V2.9 Users Guide
  2452.  
  2453.  
  2454.  
  2455.            You can place substitution parameter directives anywhere in a
  2456.            asterisk line. The characters "<", ">", and "$" must be
  2457.            preceded with a $ if you don't want DOS Phantom to handle them
  2458.            specially. For example, if I wanted DOS Phantom to play "Hello,
  2459.            World" followed by an Alt-F5 and then "The amount <is> $2.00."
  2460.            without a carriage return at the end, I would use the following
  2461.            asterisk line:
  2462.  
  2463.  
  2464.              * Hello, World<Alt-F5>The amount $<is$> $$2.00.$
  2465.  
  2466.  
  2467.  
  2468.            You can mix compressed and non-compressed modes in the same
  2469.            text file.
  2470.  
  2471.            You can cause PTM2TXT to produce compressed mode output from
  2472.            your recordings by including the /C switch on the command line
  2473.            like this:
  2474.  
  2475.  
  2476.                 C:\> PTM2TXT /C RECORDNG.PTM RECORDNG.TXT
  2477.  
  2478.  
  2479.  
  2480.            Note that the switches to the PTM2TXT command must be separated
  2481.            from the PTM2TXT command and other switches by spaces.
  2482.  
  2483.  
  2484.  
  2485.            9.2.5. Pop-Up Displays
  2486.  
  2487.            You can cause windows containing text you provide to pop up
  2488.            during playbacks of DOS Phantom recordings. These pop-up
  2489.            displays can contain text explaining what the user is seeing in
  2490.            a demonstration, announce a that a certain operation is about
  2491.            to take place, or instruct the user to perform some action.
  2492.  
  2493.            When a pop-up display is displayed, playback is halted until
  2494.            the user presses any key or until a timeout period which you
  2495.            specify has elapsed.
  2496.  
  2497.            The text which you wish to appear in a pop-up display is placed
  2498.            between two DOS Phantom directives: $BeginDisplay and
  2499.            $EndDisplay. If you want a title to appear in the upper left
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.                                     38
  2507.  
  2508.  
  2509.  
  2510.                            DOS Phantom V2.9 Users Guide
  2511.  
  2512.  
  2513.  
  2514.            border of the pop-up display, you may include a $Title
  2515.            directive on the line following the $BeginDisplay directive.
  2516.  
  2517.            The $BeginDisplay directive takes the following form:
  2518.  
  2519.  
  2520.                  $BeginDisplay row col attr timo sr
  2521.  
  2522.  
  2523.  
  2524.            The parameters following the directive are interpreted as
  2525.            follows:
  2526.  
  2527.            o  row - the screen row on which the top pop-up display is to
  2528.               be written.
  2529.  
  2530.            o  col - the screen column on which the left edge of the pop-
  2531.               up display is to be written.
  2532.  
  2533.            o  attr - The display attributes to be used for display of
  2534.               your text:
  2535.  
  2536.  
  2537.                 Attribute      Mono Display        Color Display
  2538.                 ---------      --------------      -----------------------
  2539.                 0              Normal              Gray on Blue
  2540.                 1              Bold                White on Blue
  2541.                 2              Reverse Video       Dark Gray on Light Gray
  2542.                 3              Reverse Bold        Black on Light Gray
  2543.                 8              Normal              Normal
  2544.                 9              Bold                Bold
  2545.  
  2546.  
  2547.  
  2548.            o  timo - A timeout value in seconds. If the timeout period
  2549.               passes without keyboard input, the display is erased and
  2550.               playback resumes. The maximum timeout value is 3600 seconds
  2551.               (1 hour).
  2552.  
  2553.            o  sr - The character S or R indicating whether you wish other
  2554.               DOS Phantom displays and menus which may be present on the
  2555.               screen to be erased before this window is displayed. R
  2556.               restores the screen to what it was before any DOS Phantom
  2557.               displays or menus were popped-up. S saves the screen as it
  2558.               is and causes the new display to be painted over anything
  2559.               currently shown on the screen.
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.                                     39
  2566.  
  2567.  
  2568.  
  2569.                            DOS Phantom V2.9 Users Guide
  2570.  
  2571.  
  2572.  
  2573.            DOS Phantom pop-up displays are automatically erased when
  2574.            playback is resumed.
  2575.  
  2576.            The text you wish to appear in the pop-up display is placed
  2577.            between the $BeginDisplay and $EndDisplay directives.Here is an
  2578.            example of the directives used to create a pop-up display:
  2579.  
  2580.  
  2581.              !
  2582.              ! Create a display at row 5, column 20, reverse video,
  2583.              ! 2-minute timeout and erase any currently displayed pop-ups.
  2584.              !
  2585.              $BeginDisplay 5 20 2 120 R
  2586.              $Title Sample Pop-Up Display
  2587.  
  2588.              This is just a simple example of a
  2589.              DOS Phantom pop-up display.
  2590.  
  2591.              (Press any key to continue.)
  2592.              $EndDisplay
  2593.  
  2594.  
  2595.  
  2596.            Here's how the above pop-up display would appear on the screen
  2597.            (at row 5, column 20):
  2598.  
  2599.  
  2600.                   +--Sample Pop-Up Display---------------+
  2601.                   |                                      |
  2602.                   | This is just a simple example of a   |
  2603.                   |    DOS Phantom pop-up display.       |
  2604.                   |                                      |
  2605.                   |   (Press any key to continue.        |
  2606.                   +--------------------------------------+
  2607.  
  2608.  
  2609.  
  2610.            Note that when you specify the row and column for the display
  2611.            you should take into account that DOS Phantom will add 3
  2612.            columns-worth of border to each line and an extra row at the
  2613.            top and bottom for the border.
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.                                     40
  2625.  
  2626.  
  2627.  
  2628.                            DOS Phantom V2.9 Users Guide
  2629.  
  2630.  
  2631.  
  2632.            9.2.6. Labels and the $GOTO Directive
  2633.  
  2634.            You can cause playback to transfer from one place in a
  2635.            recording file to another by using the $Goto directive. The
  2636.            $Goto directive has a single parameter: the label of the
  2637.            location from which playback is to continue. Labels in DOS
  2638.            Phantom recording files take the form
  2639.  
  2640.  
  2641.                 $<text>:
  2642.  
  2643.  
  2644.  
  2645.            where <test> is any printable text string not starting with a
  2646.            digit and not containing spaces or tabs. Here is an example of
  2647.            a recording which continually clears the screen and the
  2648.            displays the current directory:
  2649.  
  2650.              !
  2651.              ! Endless loop directory
  2652.              !
  2653.              $Loop:
  2654.              * CLS
  2655.              * DIR /W
  2656.              $Goto Loop
  2657.  
  2658.  
  2659.  
  2660.            Note that the colon following the label is not included when
  2661.            the label is the parameter of the $Goto directive.
  2662.  
  2663.            The $Goto is most useful for returning to a pop-up menu after
  2664.            the actions requested by the user have been carried out. (Pop-
  2665.            up menus are described in the next section.)
  2666.  
  2667.  
  2668.  
  2669.            9.2.7. Pop-Up Menus
  2670.  
  2671.            You can cause menus to pop up during playbacks of DOS Phantom
  2672.            recordings. These pop-up menus can contain text and items from
  2673.            which the user may choose. Once an item is selected, playback
  2674.            resumes at the place in the recording file which is associated
  2675.            with that menu selection.
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.                                     41
  2684.  
  2685.  
  2686.  
  2687.                            DOS Phantom V2.9 Users Guide
  2688.  
  2689.  
  2690.  
  2691.            When a pop-up menu is displayed, playback is halted until the
  2692.            user selects an item or until a timeout period which you
  2693.            specify has elapsed.
  2694.  
  2695.            The text and selection items which you wish to appear in a pop-
  2696.            up menu are placed between two DOS Phantom directives:
  2697.            $BeginMenu and $EndMenu. If you want a title to appear in the
  2698.            upper left border of the pop-up menu, you may include a $Title
  2699.            directive on the line following the $BeginMenu directive.
  2700.  
  2701.            The $BeginMenu directive takes the following form:
  2702.  
  2703.  
  2704.                 $BeginMenu row col attr timo sr incr
  2705.  
  2706.  
  2707.  
  2708.            The parameters following the directive are interpreted as
  2709.            follows:
  2710.  
  2711.              row - the screen row on which the top pop-up menu is to be
  2712.              written.
  2713.  
  2714.              col - the screen column on which the left edge of the pop-up
  2715.              menu is to be written.
  2716.  
  2717.              attr - The display attributes to be used for display of your
  2718.              text:
  2719.  
  2720.  
  2721.                 Attribute      Mono Display        Color Display
  2722.                 ---------      --------------      -----------------------
  2723.                 0              Normal              Gray on Blue
  2724.                 1              Bold                White on Blue
  2725.                 2              Reverse Video       Dark Gray on Light Gray
  2726.                 3              Reverse Bold        Black on Light Gray
  2727.                 8              Normal              Normal
  2728.                 9              Bold                Bold
  2729.  
  2730.              timo - A timeout value in seconds. If the timeout period
  2731.              passes without keyboard input, the display is erased and
  2732.              playback resumes. The maximum timeout value is 3600 seconds
  2733.              (1 hour).
  2734.  
  2735.              sr - The character S or R indicating whether you wish other
  2736.              DOS Phantom displays and menus which may be present on the
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.                                     42
  2743.  
  2744.  
  2745.  
  2746.                            DOS Phantom V2.9 Users Guide
  2747.  
  2748.  
  2749.  
  2750.              screen to be erased before this window is displayed. R
  2751.              restores the screen to what it was before any DOS Phantom
  2752.              displays or menus were popped-up. S saves the screen as it
  2753.              is and causes the new display to be painted over anything
  2754.              currently shown on the screen.
  2755.  
  2756.              incr - if specified as 1, the auto-incrementing feature of
  2757.              the menu is disabled, and each time the menu is encountered,
  2758.              the first item will be highlighted.  If left off, or
  2759.              specified as zero, each time the menu is encountered, the
  2760.              selected item is incremented. The auto-incrementng feature
  2761.              makes possible unattended demos which cycle through all the
  2762.              menu selections.
  2763.  
  2764.            DOS Phantom pop-up menus are automatically erased when playback
  2765.            is resumed.
  2766.  
  2767.            Menu selection items are placed after the $BeginMenu and the
  2768.            optional $Title directives and after any introductory text you
  2769.            wish to appear above the selection items in the menu window.
  2770.            Menu selection items are prefixed by $<label> where <label> is
  2771.            the label at which playback is to be resumed (or at which
  2772.            another display or menu is defined) if that menu item is
  2773.            chosen. Labels are described in the section on the $Goto
  2774.            directive.
  2775.  
  2776.            Here is an example of the directives used to create a pop-up
  2777.            menu:
  2778.  
  2779.              !
  2780.              ! Create a menu at row 5, column 20, reverse video, 10-second
  2781.              ! timeout and retain any currently displayed pop-ups.
  2782.              !
  2783.              $START:
  2784.  
  2785.              $BeginMenu 5 20 2 10 S
  2786.              $Title Sample Pop-Up Menu
  2787.  
  2788.              Choose one of the items below
  2789.              by moving the highlight bar
  2790.              with the arrow keys and pressing
  2791.              RETURN when the item you want
  2792.              is highlighted.
  2793.  
  2794.              $DIR Directory
  2795.              $CLEAR Clear Screen
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.                                     43
  2802.  
  2803.  
  2804.  
  2805.                            DOS Phantom V2.9 Users Guide
  2806.  
  2807.  
  2808.  
  2809.              $QUIT Quit
  2810.              $EndMenu
  2811.  
  2812.              $DIR:
  2813.              * dir/w
  2814.              $Goto start
  2815.  
  2816.              $CLEAR:
  2817.              * cls
  2818.              $Goto start
  2819.  
  2820.              $QUIT:
  2821.              * exit
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.            Here's how the above pop-up menu would appear on the screen (at
  2828.            row 5, column 20):
  2829.  
  2830.  
  2831.                   +--Sample Pop-Up Menu----------------+
  2832.                   |                                    |
  2833.                   | Choose one of the items below      |
  2834.                   | by moving the highlight bar        |
  2835.                   | with the arrow keys and pressing   |
  2836.                   | RETURN when the item you want      |
  2837.                   | is highlighted.                    |
  2838.                   |                                    |
  2839.                   | Directory                          |
  2840.                   | Clear Screen                       |
  2841.                   | Quit                               |
  2842.                   +------------------------------------+
  2843.  
  2844.            Note that when you specify the row and column for the menu you
  2845.            should take into account that DOS Phantom will add 3 columns-
  2846.            worth of border to each line and an extra row at the top and
  2847.            bottom for the border.
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.                                     44
  2861.  
  2862.  
  2863.  
  2864.                            DOS Phantom V2.9 Users Guide
  2865.  
  2866.  
  2867.  
  2868.            9.2.8. The $IfKey Directive
  2869.  
  2870.            The $IfKey directive can be used to determine what key was used
  2871.            to terminate a $Begin/EndDisplay, a $Pause, or a $Sleep
  2872.            condition. The $IfKey directive takes to following form:
  2873.  
  2874.                 $IfKey <label> <key>
  2875.  
  2876.            A branch is taken to the label specified if the key specified
  2877.            was the last key entered at the keyboard.
  2878.  
  2879.            $IfKey is most useful immediately following a pop-up display or
  2880.            $Pause.  A series of $IfKey directives can be used to dispatch
  2881.            to another part of the playback script based on which key was
  2882.            pressed.
  2883.  
  2884.            $IfKey can be used in conjunction with $ResumeKey to create the
  2885.            effect of "hot keys" during a Phantom playback. You set up a
  2886.            number of keys to end a $Pause with $ResumeKey and then, when
  2887.            the playback is resumed after the pause, use $IfKey to
  2888.            determine which key was used to resume playback.
  2889.  
  2890.            Here is a phantom playback script containing several uses of
  2891.            $IfKey along with $ResumeKey, $Begin/EndDisplay, and $Pause:
  2892.  
  2893.  
  2894.             !
  2895.             ! HOTMENU - An example of the use of $ResumeKey and $IfKey
  2896.             ! to implement pop-up display-based menus and playback hot keys.
  2897.             !
  2898.             !
  2899.             $Loop:
  2900.             $BeginDisplay 4 15 1 30 R
  2901.             $Title HotMenu
  2902.  
  2903.                 Select one of the options below
  2904.                 by typing the letter preceeding
  2905.                 the option name.
  2906.  
  2907.                 A  Directory of .EXE files
  2908.                 B  Directory of .COM files
  2909.                 C  Directory of .BAT files
  2910.                 X  Exit
  2911.  
  2912.             $EndDisplay
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.                                     45
  2920.  
  2921.  
  2922.  
  2923.                            DOS Phantom V2.9 Users Guide
  2924.  
  2925.  
  2926.  
  2927.             !
  2928.             ! See if they pressed one of the special keys
  2929.             !
  2930.             $IfKey DIREXE A
  2931.             $IfKey DIREXE a
  2932.  
  2933.             $IfKey DIRCOM B
  2934.             $IfKey DIRCOM b
  2935.  
  2936.             $IfKey DIRBAT C
  2937.             $IfKey DIRBAT c
  2938.  
  2939.             $IfKey EXIT X
  2940.             $IfKey EXIT x
  2941.  
  2942.             !
  2943.             ! They didn't press a special key.  re-display the "menu"
  2944.             !
  2945.             $Goto Loop
  2946.  
  2947.             !
  2948.             ! Handle the "menu" options.  After executing the command,
  2949.             ! wait 10 seconds or for any keystroke before re-displaying the
  2950.             ! "menu".
  2951.             !
  2952.             $DIREXE:
  2953.             * CLS
  2954.             * DIR *.EXE
  2955.             $ResumeKey Any
  2956.             $Pause 10
  2957.             $Goto Loop
  2958.  
  2959.             $DIRCOM:
  2960.             * CLS
  2961.             * DIR *.COM
  2962.             $ResumeKey Any
  2963.             $Pause 10
  2964.             $Goto Loop
  2965.  
  2966.             $DIRBAT:
  2967.             * CLS
  2968.             * DIR *.BAT
  2969.             $ResumeKey Any
  2970.             $Pause 10
  2971.             $Goto Loop
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.                                     46
  2979.  
  2980.  
  2981.  
  2982.                            DOS Phantom V2.9 Users Guide
  2983.  
  2984.  
  2985.  
  2986.             !
  2987.             ! Take them to DOS.  Wait for F12 to re-display the "menu", or
  2988.             ! Alt-F12 to exit the playback.
  2989.             !
  2990.             $EXIT:
  2991.             * cls
  2992.             * Rem  **** Use F12 to return to the menu. ****
  2993.             $ResumeKey <F12> <Alt-F12>
  2994.             $Pause
  2995.             $IfKey END <Alt-F12>
  2996.             $Goto Loop
  2997.  
  2998.             $END:
  2999.             $Music C4/5 R/5 C4/5
  3000.  
  3001.  
  3002.  
  3003.  
  3004.            9.2.9. Programmed Screen Capture
  3005.  
  3006.            The $Screen directive can be included in a recording file to
  3007.            cause the contents of the screen to be written to a file. You
  3008.            may specify a line of text to appear before each screen in the
  3009.            file, and the name of the file.
  3010.  
  3011.            The $Screen directive takes the following form:
  3012.  
  3013.  
  3014.                 $Screen "text" file
  3015.  
  3016.  
  3017.  
  3018.            The text must be placed between quotation marks. It is used to
  3019.            separate a series of screens written to the same file. The file
  3020.            parameter is optional. If it is not present, the file
  3021.            SCREEN.TXT in the current directory is used. If the file,
  3022.            whether specified or defaulted, is not present, it is created.
  3023.            If it is present, the current contents of the screen are
  3024.            appended to the file prefixed by the specified text line.
  3025.  
  3026.            Note that screen capture can also be controlled using the /D
  3027.            and /F command line switches described earlier.
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.                                     47
  3038.  
  3039.  
  3040.  
  3041.                            DOS Phantom V2.9 Users Guide
  3042.  
  3043.  
  3044.  
  3045.            9.2.10. Programmed Print Capture
  3046.  
  3047.            The $Printer directive allows you to direct output which would
  3048.            normally go to a printer to a file. You can turn the print
  3049.            capture on and off and specify the file to which printer output
  3050.            is to be directed.
  3051.  
  3052.            The $Printer directive takes the following form:
  3053.  
  3054.  
  3055.                 $Printer C file
  3056.  
  3057.             or
  3058.  
  3059.                 $Printer N
  3060.  
  3061.  
  3062.  
  3063.            The $Printer C (for Capture) directive enables print capture.
  3064.            If a file is specified, printer output is directed to that
  3065.            file. If no file is specified, the default is PRINTER.TXT. The
  3066.            $Printer N (for Normal) command disables print capture and
  3067.            printer output once again is sent to the printer.
  3068.  
  3069.            Print capture can also be enabled with the /V command line
  3070.            switch.
  3071.  
  3072.            Note:
  3073.            Be sure not to return the printer to normal too soon. The MS-
  3074.            DOS PRINT program (as well as other print spooling TSR's) goes
  3075.            on sending characters to the printer even after control has
  3076.            returned to the command line. If you issue a $Printer N command
  3077.            before PRINT has finished, the remainder of your output may be
  3078.            sent to the printer.
  3079.  
  3080.  
  3081.  
  3082.            9.2.11. Pacing
  3083.  
  3084.            The $SetPace directive allows you to specify the number of
  3085.            milliseconds which are to elapse between successive keystrokes
  3086.            during playback. This can be useful if you find a compressed or
  3087.            /Q-invoked playback is overrunning a program's capability of
  3088.            accepting input.
  3089.  
  3090.            The $SetPace directive takes the following form:
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.                                     48
  3097.  
  3098.  
  3099.  
  3100.                            DOS Phantom V2.9 Users Guide
  3101.  
  3102.  
  3103.  
  3104.  
  3105.                 $SetPace ms
  3106.  
  3107.  
  3108.  
  3109.            Where ms is the number of milliseconds between keystrokes. The
  3110.            actual delay is rounded to the nearest 55-millisecond boundary
  3111.            as that is the default resolution of the PC's clock. You can
  3112.            disable pacing with
  3113.  
  3114.  
  3115.                 $SetPace 0.
  3116.  
  3117.  
  3118.            Note:
  3119.            A playback can not be interrupted using the attention hot
  3120.            key when a $SetPace directive is in effect. Once started,
  3121.            the paced section must play to completion.
  3122.  
  3123.  
  3124.  
  3125.            9.2.12. Matching Screen Text
  3126.  
  3127.            The directives $MatchWait, $MatchAt, $MatchTo, and $MatchFrom
  3128.            are used to cause a playback to pause until a text string you
  3129.            specify appears on the screen or until a timeout period you
  3130.            specify has passed. The $IfMatch and $IfTimeout directives
  3131.            allow you to determine whether a preceding $MatchWait directive
  3132.            ended with a timeout or a match and goto a label in your
  3133.            recording file depending on which occurred.
  3134.  
  3135.            The $MatchWait directives takes the following forms:
  3136.  
  3137.  
  3138.                 $MatchWait timo text
  3139.                 $MatchAt r,c timo text
  3140.                 $MatchTo r,c timo text
  3141.                 $MatchFrom r,c timo text
  3142.  
  3143.  
  3144.  
  3145.            Where timo is the timeout period in seconds, r,c is the screen
  3146.            row and column (1,1 is the upper left corner of the screen) and
  3147.            text is the text string to look for on the screen. The text
  3148.            string may contain spaces, and the special characters <, >, and
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.                                     49
  3156.  
  3157.  
  3158.  
  3159.                            DOS Phantom V2.9 Users Guide
  3160.  
  3161.  
  3162.  
  3163.            $ need not be prefixed with a $ as is the case elsewhere in
  3164.            recording files.
  3165.  
  3166.            $MatchWait searches for a match anywhere on the screen.
  3167.            $MatchAt searches for a match at the row and column specified
  3168.            only. $MatchTo searches for a match in the portion of the
  3169.            screen before the row and column specified, and $MatchFrom
  3170.            searches for a match in the portion of the screen after the row
  3171.            and column specified.
  3172.  
  3173.            A timeout value of zero disables the timeout, and the $Match
  3174.            directive will wait forever for the text to appear on the
  3175.            screen.
  3176.  
  3177.            $MatchAt can accept a special timeout value: -1. This results
  3178.            in a single test of the screen contents (effectively a timeout
  3179.            of zero). -1 may not be used with the other $Match directives.
  3180.  
  3181.            The $IfMatch and $IfTimeout take a single parameter: the label
  3182.            to go to if a match or timeout occurred, respectively.
  3183.  
  3184.            Here is an example of a recording file segment which executes a
  3185.            DOS DIR command and then waits 10 seconds for the DOS prompt to
  3186.            appear before continuing and issuing an EXIT command.
  3187.  
  3188.              * DIR
  3189.              $MatchWait 10 C:\>
  3190.              * EXIT
  3191.  
  3192.  
  3193.            Here is a more complex example using $IfTimeout. This example
  3194.            issues <CR> characters until the word "Username:" appears on
  3195.            the screen. It then issues the name BILLSMITH and waits for the
  3196.            word "Password:" to appear. If "Password:" does not appear
  3197.            within 5 seconds, it goes back to sending <CR>'s and waiting
  3198.            for "Username:"
  3199.  
  3200.  
  3201.              $LOOP:
  3202.              * <CR>$
  3203.  
  3204.              $MatchWait 3 Username:
  3205.              $IfMatch CONTINUE
  3206.              $Goto LOOP
  3207.  
  3208.              $CONTINUE:
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.                                     50
  3215.  
  3216.  
  3217.  
  3218.                            DOS Phantom V2.9 Users Guide
  3219.  
  3220.  
  3221.  
  3222.              * BILLSMITH
  3223.              $MatchWait 5 Password:
  3224.              $IfTimeout LOOP
  3225.  
  3226.            The above is overly complex -- in particular, the $IfMatch
  3227.            followed by the $Goto and the CONTINUE label could all be
  3228.            replaced with just $IfTimeout LOOP. It is shown the way it is
  3229.            so that all the directives described in this section could be
  3230.            used.
  3231.  
  3232.            Note that $MatchWait searches the entire screen for a match,
  3233.            not just what was output since the last keystroke. You need to
  3234.            make sure that the text string you are waiting for isn't
  3235.            already on the screen, or your $MatchWait will appear to
  3236.            terminate prematurely.
  3237.  
  3238.            Also note that the $Match directives are case-sensitive. That
  3239.            is, they do not treat "Username" and "username" as a match. The
  3240.            letters must the same case (upper or lower) for a match to
  3241.            occur.
  3242.  
  3243.            The /O switch is provided to assist you in creating recording
  3244.            files using the $Match directives. /O causes recent screen
  3245.            output to be included in recording files as comments. You can
  3246.            edit these comments into $Match directives without having to
  3247.            remember what was on the screen when you recorded the session.
  3248.            The /O-captured output is far from perfect, and frequently may
  3249.            not be what is really needed in the $Match diectives.
  3250.            Alternatively, you can use the /D command line switch to enable
  3251.            a screen capture hot key and capture the important screens
  3252.            during recording and then refer to them when inserting your
  3253.            $MatchWait directives. Remember that the /O switch creates
  3254.            significant overhead and should only be used when needed.
  3255.  
  3256.  
  3257.  
  3258.            9.2.13. Waiting for Program Exit
  3259.  
  3260.            The $ExitWait directive causes a playback to pause until the
  3261.            next DOS program exits. This allows you to run a program, turn
  3262.            control over to the keyboard, and resume playback as soon as
  3263.            the program ends. An optional timeout value allows you to
  3264.            resume playback after a number of seconds without keystrokes
  3265.            has passed.
  3266.  
  3267.            The form of the $ExitWait directive is as follows:
  3268.  
  3269.  
  3270.  
  3271.  
  3272.  
  3273.                                     51
  3274.  
  3275.  
  3276.  
  3277.                            DOS Phantom V2.9 Users Guide
  3278.  
  3279.  
  3280.  
  3281.  
  3282.                 $ExitWait n
  3283.  
  3284.  
  3285.  
  3286.            Where n is the number of seconds to wait before continuing with
  3287.            playback if no keystrokes are detected.
  3288.  
  3289.            You can use the $IfTimeout directive to determine whether a
  3290.            $ExitWait directive terminated because it timed out or because
  3291.            of program exit.
  3292.  
  3293.            Here is an example of running a program called TROJAN and
  3294.            waiting for program exit or 1 minute without keystrokes. If a
  3295.            timeout occurs, a CTRL-C character is delivered to the program
  3296.            to terminate it before continuing.
  3297.  
  3298.  
  3299.              * TROJAN
  3300.              $ExitWait 60
  3301.              $IfTimeout TERMINATE
  3302.  
  3303.              $CONTINUE:
  3304.              .
  3305.              .
  3306.              .
  3307.  
  3308.              $TERMINATE:
  3309.              * <Ctrl-C>$
  3310.              $Goto CONTINUE
  3311.  
  3312.  
  3313.  
  3314.            9.2.14. Detecting Exit Status
  3315.  
  3316.            Many DOS programs return an "exit status" when they terminate
  3317.            indicating whether they were successful in performing whatever
  3318.            function they were supposed to perform. The $IfError and
  3319.            $IfSuccess directives enable you to go to a label depending on
  3320.            the exit status of the last program you ran.
  3321.  
  3322.            Here is the example from the previous section re-coded to take
  3323.            advantage of these directives:
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.                                     52
  3333.  
  3334.  
  3335.  
  3336.                            DOS Phantom V2.9 Users Guide
  3337.  
  3338.  
  3339.  
  3340.              $LOOP:
  3341.              * TROJAN
  3342.              $ExitWait 60
  3343.              $IfTimeout TERMINATE
  3344.              $IfSuccess CONTINUE
  3345.              $IfError LOOP
  3346.  
  3347.              $CONTINUE:
  3348.              .
  3349.              .
  3350.              .
  3351.  
  3352.              $TERMINATE:
  3353.              * <Ctrl-C>$
  3354.              $Goto CONTINUE
  3355.  
  3356.            Note that the $IfSuccess CONTINUE is actually superfluous,
  3357.            since execution would continue at the CONTINUE label anyway. It
  3358.            was included to demonstrate the use of the directive.
  3359.  
  3360.            The $IfSuccess and $IfError simply check for an exit code of
  3361.            zero or anything else (zero indicating success). The
  3362.            $IfExitCode directive allows you to branch to a label depending
  3363.            on whether a specific exit code was returned. The format of the
  3364.            $IfExitCode directive is
  3365.  
  3366.               $IfExitCode n label
  3367.  
  3368.            where n is the exitcode to test for, and label is the label to
  3369.            branch to if the exit code is indeed n.
  3370.  
  3371.  
  3372.  
  3373.            9.2.15. Disabling Keyboard Input - $DisableKybd
  3374.  
  3375.            The $DisableKybd causes DOS Phantom to ignore keyboard input
  3376.            until the $EnableKybd directive is encountered. This allows you
  3377.            to use $Pause, $MatchWait, and $ExitWait directives without
  3378.            interference.
  3379.  
  3380.            The $DisableKyd directive accepts a single optional parameter:
  3381.            a letter or number designating a key which when depressed will
  3382.            re-enable the keyboard.  If no parameter is provided, the only
  3383.            way the keyboard can be re-enabled is with the $EnableKybd
  3384.            directive.  Only letters and numbers may be specified in the
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.                                     53
  3392.  
  3393.  
  3394.  
  3395.                            DOS Phantom V2.9 Users Guide
  3396.  
  3397.  
  3398.  
  3399.            $DisableKybd directive; no Alt or Ctrl key combinations are
  3400.            allowed, and letters are not case-sensitive.
  3401.  
  3402.  
  3403.  
  3404.            9.2.16. Flushing the Typeahead Buffer - $FlushTypAhd
  3405.  
  3406.            The $FlushTypAhd directive removes any characters which have
  3407.            accumulated in the typeahead buffer and have not been read by a
  3408.            program.
  3409.  
  3410.  
  3411.  
  3412.            9.2.17. Disabling Ctl-Alt-Del
  3413.  
  3414.            The $DisableCtrlAltDel directive prohibits the rebooting of the
  3415.            computer using the Ctrl-Alt-Del key combination until the
  3416.            $EnableCtrlAltDel directive is encountered. This can be useful
  3417.            to protect critical sections of a playback from accidental
  3418.            rebooting from the keyboard. Of course, the power could still
  3419.            be turned off, or the reset button pressed.
  3420.  
  3421.  
  3422.  
  3423.            9.2.18. Programmed Reboots - $Reboot
  3424.  
  3425.            The $Reboot directive allows you to reboot your computer from
  3426.            within a DOS Phantom playback file. This can be useful for re-
  3427.            configuring a system at preset times (installing different
  3428.            CONFIG.SYS and AUTOEXEC.BAT files) from a scheduled Phantom
  3429.            playback.
  3430.  
  3431.  
  3432.  
  3433.            9.2.19. Retaining Keyboard Flags - $RetainKybdFlags
  3434.  
  3435.            Normally, when a playback is complete, DOS Phantom returns the
  3436.            state of the toggle keys Insert, NumLock, ScrollLk and CapsLock
  3437.            to the state they were in before the playback was started. If
  3438.            you wish the keys to remain in the state they were in when the
  3439.            playback ended, use the $RetainKybdFlags directive anywhere in
  3440.            your playback file.
  3441.  
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.  
  3448.  
  3449.  
  3450.                                     54
  3451.  
  3452.  
  3453.  
  3454.                            DOS Phantom V2.9 Users Guide
  3455.  
  3456.  
  3457.  
  3458.            9.2.20. Using the $SETMODE Directives
  3459.  
  3460.            The $SetMode directives could have been called the "Prodigy
  3461.            directives" since their usefulness appears to be limited to
  3462.            fast playback into the Prodigy on-line service. Prodigy uses
  3463.            what may be a unique method of obtaining characters from the
  3464.            keyboard which can cause loss of characters during high-speed
  3465.            playback. To ensure against this, the $SetMode Func6 directive
  3466.            should be placed after the command which invokes Prodigy, and
  3467.            the $SetMode Normal command placed just after the command
  3468.            terminating Prodigy.
  3469.  
  3470.            You may not experience difficulties playing back into Prodigy
  3471.            without these directives. If that is the case, ignore this
  3472.            section. If you do experience character loss playing into
  3473.            Prodigy, these directives should solve the problem.
  3474.  
  3475.            Here is an example of the use of the $SetMode directives where
  3476.            Prodigy is invoked, the stock price for IBM is displayed, and
  3477.            Prodigy is terminated.
  3478.  
  3479.              * Prodigy
  3480.              $SetMode Func6
  3481.  
  3482.              !
  3483.              ! Prodigy user ID and password
  3484.              !
  3485.              * HDCK21B<Tab>PASSWORD
  3486.  
  3487.              !
  3488.              ! Jump to quote check
  3489.              !
  3490.              * <F6>Quote Check
  3491.  
  3492.              !
  3493.              ! Display IBM's current price
  3494.              !
  3495.              * IBM
  3496.  
  3497.              !
  3498.              ! Give us a chance to read it
  3499.              !
  3500.              $Wait 00:30.000
  3501.  
  3502.              !
  3503.              ! Leave prodigy
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.                                     55
  3510.  
  3511.  
  3512.  
  3513.                            DOS Phantom V2.9 Users Guide
  3514.  
  3515.  
  3516.  
  3517.              !
  3518.              * <Shft-Tab><Shft-Tab>
  3519.              * E
  3520.  
  3521.              $SetMode Normal
  3522.  
  3523.  
  3524.  
  3525.         9.2.21. String Variables
  3526.  
  3527.            V2.9 of DOS Phantom adds support for 9 string variables S1-S9.
  3528.            To include the contents of a string variable in playback, the
  3529.            string variable is prefixed with a dollar sign, similar to
  3530.            command line parameters. For example, here is an output
  3531.            statement which includes a command line parameter as well as a
  3532.            string variable:
  3533.  
  3534.                 * REM The value of $$1 is $1. The value of S3 is $S3.
  3535.  
  3536.  
  3537.  
  3538.            A number of directives are available for dealing with string
  3539.            variables:
  3540.  
  3541.            $Assign Sn <text>
  3542.  
  3543.                 Assigns <text> to string variable Sn. <Text> may contain
  3544.                 string and command line variables. The contents of Sn, if
  3545.                 any, are overwritten.
  3546.  
  3547.  
  3548.  
  3549.            $Get r,c len Sn
  3550.  
  3551.                 Reads len characters from the screen at row r column c
  3552.                 into string variable Sn. The contents of Sn, if any, are
  3553.                 overwritten.
  3554.  
  3555.  
  3556.  
  3557.            $Read <file> Sn
  3558.  
  3559.                 Reads a line from file <file> into string variable Sn. The
  3560.                 contents of Sn, if any, are overwritten.
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.                                     56
  3569.  
  3570.  
  3571.  
  3572.                            DOS Phantom V2.9 Users Guide
  3573.  
  3574.  
  3575.  
  3576.            $Write <file> <text>
  3577.  
  3578.                 Appends <text> to <file>. <Text> may contain string and
  3579.                 command line variables, for example: "parm1=$1, string
  3580.                 variable 3=$S3". (The quotation marks are not required
  3581.                 syntax.)
  3582.  
  3583.  
  3584.  
  3585.            $IfEqual <label> Sn <text>
  3586.  
  3587.                 Branches to <label> if the contents of Sn are equal to
  3588.                 <text>. <Text> may contain string and command line
  3589.                 parameters. Comparison is case-sensitive.
  3590.  
  3591.  
  3592.  
  3593.            $IfEmpty <label> Sn
  3594.  
  3595.                 Branches to <label> if the string variable Sn is empty.
  3596.  
  3597.  
  3598.  
  3599.            $Clear Sn
  3600.  
  3601.                 Empties the string variable Sn.
  3602.  
  3603.  
  3604.  
  3605.            The maximum length of a string variable is 79 characters.
  3606.  
  3607.            String variables retain their contents between successive
  3608.            Phantom playbacks if DOS Phantom is not unloaded from memory in
  3609.            between.
  3610.  
  3611.  
  3612.  
  3613.         9.2.22. Working with Files
  3614.  
  3615.            A number of directives are available for working with files.
  3616.            They are listed here.
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.                                     57
  3628.  
  3629.  
  3630.  
  3631.                            DOS Phantom V2.9 Users Guide
  3632.  
  3633.  
  3634.  
  3635.            $FirstFile Sn <filename>
  3636.  
  3637.                 Locates the first file matching <filename> which may
  3638.                 include the * and ? wildcard characters and disk and
  3639.                 directory specifications. The filename is placed in Sn.
  3640.  
  3641.  
  3642.  
  3643.            $NextFile Sn
  3644.  
  3645.                 Locates the next file matching the <filename> in the last
  3646.                 $FirstFile executed. The filename is placed in Sn. If no
  3647.                 more files exist which match the <filename> specified in
  3648.                 the last $FirstFile, the string FILE NOT FOUND is
  3649.                 returned.
  3650.  
  3651.  
  3652.  
  3653.            $Read <file> Sn
  3654.  
  3655.                 Reads a line from file <file> into string variable Sn. The
  3656.                 file is opened if this is the first $Read from it. The
  3657.                 line must not exceed 80 characters in length.  The CR and
  3658.                 LF characters are ommitted.  When the end of file is
  3659.                 reached, $Read automatically closes the file.  (The
  3660.                 $IfClosed directive can be used to detect this condition.)
  3661.                 Subsequent $Reads of the file will begin at the start of
  3662.                 the file.
  3663.  
  3664.  
  3665.  
  3666.            $Write <file> <text>
  3667.  
  3668.                 Appends <text> to <file>. <Text> may contain string and
  3669.                 command line variables, for example: "parm1=$1, string
  3670.                 variable 3=$S3". (The quotation marks are not required
  3671.                 syntax.)  A CR-LF combination (a newline) is suffixed to
  3672.                 the text unless the text string is terminated with a $.
  3673.  
  3674.  
  3675.  
  3676.            $Close
  3677.  
  3678.                 Closes the file currently open for read, if any.
  3679.                 Subsequent reads of the file will begin at the start of
  3680.                 the file.
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.                                     58
  3687.  
  3688.  
  3689.  
  3690.                            DOS Phantom V2.9 Users Guide
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.            $IfClosed <label>
  3697.  
  3698.                 Branches to <label> if no $Read file is currently open.
  3699.                 This directive can be used to detect the end of file when
  3700.                 using $Read.
  3701.  
  3702.            The $FirstFile and $NextFile directives which allow you to
  3703.            perform directory searches from within Phantom scripts.
  3704.  
  3705.            When no more files match <filename>, the string FILE NOT FOUND
  3706.            is placed in Sn. Here is an example of a script which places
  3707.            the names of all the .PTM files in the PHANTOM directory into a
  3708.            file called PTMLIST.TXT:
  3709.  
  3710.  
  3711.                 $FirstFile S1 C:\PHANTOM\*.PTM
  3712.                 $IfEqual EndLoop S1 FILE NOT FOUND
  3713.                 $Loop:
  3714.                   $Write PTMLIST.TXT $S1
  3715.                   $NextFile S1
  3716.                   $IfEqual EndLoop S1 FILE NOT FOUND
  3717.                   $Goto Loop
  3718.                $EndLoop:
  3719.  
  3720.            Only one file may be open for read at a time. If a second
  3721.            filename is encountered in a $Read directive, the first is
  3722.            automatically closed. A subsequent $Read of the first file will
  3723.            close the second file and return the first line of the first
  3724.            file.
  3725.  
  3726.            The $IfClosed directive can be used to detect end of file since
  3727.            when $Read encounters the end of file, the file being read is
  3728.            closed. The result of the last $Read is invalid if the file was
  3729.            closed by the $Read. Thus, $IfClosed should be used before
  3730.            making use of lines returned by $Read.
  3731.  
  3732.  
  3733.  
  3734.         9.2.23. Substrings - The $F Directives
  3735.  
  3736.            V2.9 of DOS Phantom introduces a new type of directive: the $F
  3737.            directive. $F directives are similar to functions in
  3738.            programming languages in that when a $F directive is placed in
  3739.            a string, the result of the $F directive replaces the $F
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.                                     59
  3746.  
  3747.  
  3748.  
  3749.                            DOS Phantom V2.9 Users Guide
  3750.  
  3751.  
  3752.  
  3753.            directive in the string. $F directives take their arguments in
  3754.            parenthesis immediately following the directive name. No spaces
  3755.            are allowed between the directive name and the leading
  3756.            parenthesis, nor are any spaces allowed between the comma-
  3757.            separated arguments within the parentheses.
  3758.  
  3759.            Three $F directives have been implemented in V2.9: $FSubStr,
  3760.            $FBefore, and $FAfter. The $FSubStr directive extracts a
  3761.            substring from a string variable. Th format of $FSubStr is
  3762.  
  3763.             $FSubStr(Sn,<start>,<length>)
  3764.  
  3765.             where    Sn is the string variable from which to extract the
  3766.                           substring,
  3767.  
  3768.                      <start> is the character at which to start
  3769.                           extracting (1-based), and
  3770.  
  3771.                      <length> is the number of characters to extract.
  3772.  
  3773.            Here is an example of $FSubStr being used to extract the
  3774.            characters EFGHTUVW from the string ABCDEFGHIJKLMNOPQRSTUVWXYZ
  3775.            and placing them in S2:
  3776.  
  3777.  
  3778.                 $Assign S1 ABCDEFGHIJKLMNOPQRSTUVWXYZ
  3779.                 $Assign S2 $FSubStr(S1,5,4)$FSubStr(S1,20,4)
  3780.  
  3781.  
  3782.            $FBefore selects the portion of a string which appears before a
  3783.            specified character, while $FAfter selects the portion of a
  3784.            string which occurs after a specified character. For example,
  3785.  
  3786.  
  3787.                 $Assign S1 RECORDNG.PTM
  3788.                 $Assign S2 $FBefore(S1,.)
  3789.                 $Assign S3 $FAfter(S1,.)
  3790.  
  3791.            results in S2 containing RECORDNG (the substring before the
  3792.            period), and  S3 containg EXE (the substring after the period).
  3793.  
  3794.             $F directives can be used wherever the $Sn syntax is allowed,
  3795.            except in *-prefixed output lines. To output a substring as if
  3796.            it was being typed at the keyboard, you must $assign it to a
  3797.            string variable first, and then output the variable, like this:
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.                                     60
  3805.  
  3806.  
  3807.  
  3808.                            DOS Phantom V2.9 Users Guide
  3809.  
  3810.  
  3811.  
  3812.                 $Assign S6 $FSubStr(S3,1,8)
  3813.                 * rem THE SUBSTRING IS $S6.
  3814.  
  3815.  
  3816.  
  3817.            Here is a sample script which places the filenames of the files
  3818.            in the current directory minus their filetypes (the three
  3819.            characters after the period) in a file called TEST.TXT. It then
  3820.            types the file.
  3821.  
  3822.  
  3823.                 * DEL TEST.TXT
  3824.                 $FirstFile S1 *.*
  3825.                 $IfEqual EndLoop S1 FILE NOT FOUND
  3826.                 $Loop:
  3827.                   $Write TEST.TXT $FBefore(S1,.)
  3828.                   $NextFile S1
  3829.                   $IfEqual EndLoop S1 FILE NOT FOUND
  3830.                   $Goto Loop
  3831.                 $EndLoop:
  3832.                 * Type TEST.TXT
  3833.  
  3834.  
  3835.  
  3836.         9.2.24. Iterated Looping - the $On Directive
  3837.  
  3838.            V2.9 adds support for looping using the $On directive. The
  3839.            format of the $On directive is:
  3840.  
  3841.                 $On <count> <label>
  3842.  
  3843.            When the $On directive has been encountered <count> times,
  3844.            control is transferred to <label>. Before <count> times, the
  3845.            directive is ignored. Here is an example of a loop which copies
  3846.            200 lines from FILEA.TXT to FILEB.TXT unless the end of
  3847.            FILEA.TXT is encountered first:
  3848.  
  3849.  
  3850.                 $Loop:
  3851.                   $Read FILEA.TXT S1
  3852.                   $IfClosed EndLoop
  3853.                   $Write FILEB.TXT $S1
  3854.                   $On 200 EndLoop
  3855.                   $Goto Loop
  3856.                $EndLoop:
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.                                     61
  3864.  
  3865.  
  3866.  
  3867.                            DOS Phantom V2.9 Users Guide
  3868.  
  3869.  
  3870.  
  3871.            A maximum of 256 $On directives may be used in a single Phantom
  3872.            script.  The maximum count value is 32767.
  3873.  
  3874.  
  3875.  
  3876.         9.2.25. Playing Music - The $Music Directive
  3877.  
  3878.            The $Music directive allows you to play melodies from a Phantom
  3879.            script. $Music accepts a series of note/duration arguments,
  3880.            each of which specifies a musical note and the length of time
  3881.            for which is to be played. Four octaves supported with notes
  3882.            from C1 to B5. The following notes are supported:
  3883.  
  3884.            A, A#, Bb, C, C#, Dd, D, D#, Eb, F, F#, Gb, G, G#, Ab, R.
  3885.  
  3886.            R is a rest (no sound). Each note is suffixed with the octave
  3887.            in which it is to be played, a forward slash, and the number of
  3888.            ticks for which the note is to be sounded.
  3889.  
  3890.            Here is how the first few notes of "Mary Had A Little Lamb"
  3891.            might be specified in a Phantom script (played in octave 3):
  3892.  
  3893.             $Music R/80
  3894.             $Music E3/60 D3/20 C3/40 D3/40 E3/15 R/25 E3/15 R/25 E3/60 /20
  3895.             $Music D3/15 R/25 D3/15 R/25 D3/40 R/40 E3/40 G3/15 R/25 G3/40
  3896.             $Music R/80
  3897.  
  3898.  
  3899.            For those less musically inclined, numbers from 1 to 69 may be
  3900.            used in place of the musical notes.
  3901.  
  3902.  
  3903.  
  3904.         9.3. Hints and Tips
  3905.  
  3906.  
  3907.  
  3908.         9.3.1. Interrupting Directive Execution
  3909.  
  3910.            When a series of directives is executed without any intervening
  3911.            keystrokes, the attention hot key may be ignored for an
  3912.            extended period, making it difficult to interrupt the playback.
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.                                     62
  3923.  
  3924.  
  3925.  
  3926.                            DOS Phantom V2.9 Users Guide
  3927.  
  3928.  
  3929.  
  3930.         9.3.2. Recovering Editing Sessions
  3931.  
  3932.            To recover an aborted editing session with DOS Phantom, for
  3933.            example, you should make sure that everything is as it was when
  3934.            you started the recording: the same files with the same
  3935.            contents, the same default disk and directory, and so on.
  3936.  
  3937.  
  3938.  
  3939.         9.3.3. Using DOS Phantom in Batch Files
  3940.  
  3941.            To use DOS Phantom from a batch file, don't use the /I command
  3942.            line switch and end your recordings with the DOS EXIT command.
  3943.            To use scraper from a batch-initiated playback, invoke Scraper
  3944.            from within the playback without the /I switch.  When you are
  3945.            done with Scraper, remove it with the DOS EXIT command. Note
  3946.            that there will be two exit commands required to terminate the
  3947.            playback if Scraper is used.
  3948.  
  3949.  
  3950.  
  3951.         9.3.4. Playback Chaining
  3952.  
  3953.            Beginning with version 2.5, during playback you can chain to
  3954.            another file by invoking Phantom at the DOS command line from
  3955.            within the first file. Note that invoking Phantom for recording
  3956.            from within a playback file is *not* supported.
  3957.  
  3958.  
  3959.  
  3960.         9.3.5. Don't Use the Mouse
  3961.  
  3962.            DOS Phantom doesn't record mouse activity, so you have to do
  3963.            everything you want recorded on the keyboard.
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978.  
  3979.  
  3980.  
  3981.                                     63
  3982.  
  3983.  
  3984.  
  3985.                            DOS Phantom V2.9 Users Guide
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.                    10. DOS Phantom Technical Information
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.            10.1. DOS Version Requirements
  4008.  
  4009.            DOS Phantom uses features first made available in MS-DOS V3.0,
  4010.            and will probably not execute properly on prior versions of MS-
  4011.            DOS.
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.            10.2. Memory Usage
  4018.  
  4019.            DOS Phantom V2.9, when installed as a TSR, uses approximately
  4020.            40K of memory.
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.                                     64
  4041.  
  4042.  
  4043.  
  4044.                            DOS Phantom V2.9 Users Guide
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.              11. License, Warranty, Registration, and Support
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.            11.1. License
  4067.  
  4068.            DOS PHANTOM is not and has never been public domain software,
  4069.            nor is it free software.
  4070.  
  4071.            Non-licensed users are granted a limited license to use DOS
  4072.            PHANTOM on a 21-day trial basis for the purpose of determining
  4073.            whether DOS PHANTOM is suitable for their needs. The use of DOS
  4074.            PHANTOM, except for the initial 21-day trial, requires
  4075.            registration. The use of unlicensed copies of DOS PHANTOM by
  4076.            any person, business, corporation, government agency or any
  4077.            other entity is strictly prohibited. A single user license
  4078.            permits a user to use DOS PHANTOM only on a single computer.
  4079.            Licensed users may use the program on different computers, but
  4080.            may not use the program on more than one computer at the same
  4081.            time.
  4082.  
  4083.            No one may modify or patch the DOS PHANTOM executable files in
  4084.            any way, including but limited to decompiling, disassembling,
  4085.            or otherwise reverse engineering the program.
  4086.  
  4087.            A limited license is granted to copy and distribute DOS PHANTOM
  4088.            only for the trial use of customers, subject to the above
  4089.            limitations, and also the following:
  4090.  
  4091.                   o   DOS PHANTOM must be copied in unmodified form,
  4092.                       complete with the provided license and registration
  4093.                       information.
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.                                     65
  4100.  
  4101.  
  4102.  
  4103.                            DOS Phantom V2.9 Users Guide
  4104.  
  4105.  
  4106.  
  4107.                   o   The full machine-readable DOS PHANTOM documentation
  4108.                       must be included with each copy.
  4109.  
  4110.                   o   DOS PHANTOM may not be distributed in conjunction
  4111.                       with any other product without a specific license to
  4112.                       do so from P2 Enterprises.
  4113.  
  4114.                   o   No fee, charge, or other compensation may be
  4115.                       requested or accepted, except as authorized below:
  4116.  
  4117.                        o  Operators of electronic bulletin board systems
  4118.                           (sysops) may make DOS PHANTOM available for
  4119.                           downloading only as long as the above conditions
  4120.                           are met. An overall or time-dependent charge for
  4121.                           the use of the bulletin board system is
  4122.                           permitted as long as there is not a specific
  4123.                           charge for the download of DOS PHANTOM.
  4124.  
  4125.                        o  Vendors of user-supported or shareware software
  4126.                           approved by the ASP may distribute DOS PHANTOM,
  4127.                           subject to the above conditions, without
  4128.                           specific permission. Non-approved vendors may
  4129.                           distribute DOS PHANTOM only after obtaining
  4130.                           written permission from P2 Enterprises. Such
  4131.                           permission is usually granted. Please write for
  4132.                           details (enclose your catalog). Vendors may
  4133.                           charge a disk duplication and handling fee,
  4134.                           which, when pro-rated to the DOS PHANTOM
  4135.                           product, may not exceed eight dollars.
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  11.2. Limited Warranty
  4142.  
  4143.  
  4144.  
  4145.            THIS PRODUCT IS LICENSED "AS IS" WITHOUT ANY WARRANTY OF ANY
  4146.            KIND INCLUDING, BUT NOT LIMITED TO IMPLIED WARRANTIES OF
  4147.            MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
  4148.            WHICH ARE EXPRESSLY DISCLAIMED. SHOULD THE PROGRAM PROVE
  4149.            DEFECTIVE, THE PURCHASER ASSUMES THE RISK OF PAYING THE ENTIRE
  4150.            COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION AND ANY
  4151.            INCIDENTAL OR CONSEQUENTIAL DAMAGES. IN NO EVENT WILL P2
  4152.            ENTERPRISES BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.                                     66
  4159.  
  4160.  
  4161.  
  4162.                            DOS Phantom V2.9 Users Guide
  4163.  
  4164.  
  4165.  
  4166.            WITHOUT LIMITATION DAMAGES FOR LOSS OF BUSINESS PROFITS,
  4167.            BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION AND THE
  4168.            LIKE) ARISING OUT OF THE USE OR THE INABILITY TO USE THIS
  4169.            PRODUCT EVEN IF P2 ENTERPRISES HAS BEEN ADVISED OF THE
  4170.            POSSIBILITY OF SUCH DAMAGES.
  4171.  
  4172.            Use of this product for any period of time constitutes your
  4173.            acceptance of this agreement and subjects you to its contents.
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.            11.2.1. Government Restricted Rights
  4182.  
  4183.            Use, duplication, or disclosure by the Government is subject to
  4184.            restrictions as set forth in subdivision (b)(3)(ii) of the
  4185.            Rights in Technical Data and Computer Software clause at
  4186.            252.227-7013. Contractor/manufacturer is P2 Enterprises, P.O.
  4187.            Box 25, Ben Lomond, CA 95005-0025.
  4188.  
  4189.            The information in this document is subject to change without
  4190.            notice and does not represent a commitment on the part of P2
  4191.            Enterprises.
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  11.3. Registration
  4200.  
  4201.  
  4202.  
  4203.            This program is shareware. It is not free. If, after an
  4204.            evaluation period of 21 days, you wish to continue using this
  4205.            program, you must register and pay the registration fee. The
  4206.            order form at the end of this document may be used to register.
  4207.  
  4208.            In response to your registration, P2 Enterprises will send you
  4209.            a personalized Product Registration Key (PRK) which you can use
  4210.            with the REGISTER program to effect registration of this
  4211.            program.
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.                                     67
  4218.  
  4219.  
  4220.  
  4221.                            DOS Phantom V2.9 Users Guide
  4222.  
  4223.  
  4224.  
  4225.            Registration suppresses the display of the statements
  4226.            requesting that you register.
  4227.  
  4228.            Registration entitles you to three months of support from P2
  4229.            Enterprises as described in the following section.
  4230.  
  4231.            Your Product Registration Key can be used to register future
  4232.            versions of this program released within one year at no
  4233.            additional cost.
  4234.  
  4235.            Licenses for unlimited use on a single LAN, licenses for
  4236.            commercial distribution of this product as part of another
  4237.            product and a Programmer's Kit are also available. See the
  4238.            order form at the end of this document for details.
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  11.4. Support
  4245.  
  4246.  
  4247.  
  4248.         11.4.1. P2 Technical Support
  4249.  
  4250.            Registered users receive three months of support from P2
  4251.            Enterprises. P2 Enterprises will answer questions and fix
  4252.            serious bugs during the three month support period. P2
  4253.            Enterprises may choose not to attempt a fix to a problem
  4254.            involving a specific hardware or software environment or
  4255.            feature. If this is the case, a full refund of the registration
  4256.            fee will be made upon your request.
  4257.  
  4258.            P2 Enterprises may be reached via a VoiceMail system at (408)
  4259.            336-8080 mailbox 9090, or via CompuServe ID 70621,2475, by
  4260.            Internet mail at p2p2p2@cruzio.santa-cruz.ca.us, or by US Mail
  4261.            at PO Box 25, Ben Lomond CA 95005-0025 USA. The VoiceMail
  4262.            system is in operation between the hours of 6AM and 6PM Pacific
  4263.            Time.
  4264.  
  4265.  
  4266.  
  4267.         11.4.2. The P2 Enterprises Customer Service BBS
  4268.  
  4269.            P2 Enterprises maintains a dial-in Customer Service BBS.  The
  4270.            latest versions of all P2 shareware products are always
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.                                     68
  4277.  
  4278.  
  4279.  
  4280.                            DOS Phantom V2.9 Users Guide
  4281.  
  4282.  
  4283.  
  4284.            available on the P2 BBS. In addition, lists of frequently asked
  4285.            questions are available for perusal or download.  Also, you can
  4286.            upload file to P2 Tech Support if you wish.  The BBS is on-line
  4287.            weeknights between 6PM and 6AM and 24 hrs on weekends. (The BBS
  4288.            shares the phone line with our voicemail system.)  The number
  4289.            for the P2 Enterprises Customer Service BBS is (408) 336-8080.
  4290.  
  4291.  
  4292.  
  4293.         11.4.3. The ASP Ombudsman
  4294.  
  4295.            P2 Enterprises is a member of the Association of Shareware
  4296.            Professionals (ASP). ASP wants to make sure that the shareware
  4297.            principle works for you. If you are unable to resolve a
  4298.            shareware-related problem with an ASP member by contacting the
  4299.            member directly, ASP may be able to help. The ASP Ombudsman can
  4300.            help you resolve a dispute or problem with an ASP member, but
  4301.            does not provide technical support for members' products.
  4302.            Please write to the ASP Ombudsman at 545 Grover Road, Muskegon,
  4303.            MI 49442 or send a CompuServe message via CompuServe Mail to
  4304.            ASP Ombudsman 70007,3536.
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.                                     69
  4337.                          REGISTRATION INFORMATION
  4338.  
  4339.      ======================================================================
  4340.            P2 Enterprises, P.O. Box 25, Ben Lomond, CA 95005-0025
  4341.      ======================================================================
  4342.  
  4343.      PRODUCT REGISTRATION KEYS (PRK)
  4344.  
  4345.      Upon receiving payment for registration, P2 Enterprises will send you
  4346.      by mail a personalized Product Registration Key (PRK) which, used with
  4347.      the Register Main Menu option, will allow you to register your current
  4348.      copy of the software as well as future versions for a period of one
  4349.      year, without additional charge or paperwork.
  4350.  
  4351.      A separate Product Registration Key is required for each copy of the
  4352.      software.  (A single copy may be moved from computer to computer, but
  4353.      if it is executed at the same time on different computers, it is
  4354.      regarded as constituting multiple copies requiring multiple
  4355.      registrations.)
  4356.  
  4357.  
  4358.      DISKETTES
  4359.  
  4360.      If you wish, we will mail you diskettes containing the latest version
  4361.      of the product(s) along with your Product Registration Key(s).  There
  4362.      is an additional charge of US$4.00 per product for diskettes.  Be sure
  4363.      to specify whether you prefer 3-1/2 or 5-1/4 inch diskettes.
  4364.  
  4365.  
  4366.      QUANTITY PURCHASES
  4367.  
  4368.      The order form on the following may be used to purchase multiple
  4369.      copies with discounts as follows:
  4370.  
  4371.                  1 - 5 copies      no discount
  4372.                  6 and up          33% discount
  4373.  
  4374.      The name on the order form is the person whose name wil be associated
  4375.      with the Product Registration Key(s).
  4376.  
  4377.  
  4378.      PAYMENT
  4379.  
  4380.      Payment may be by cash, check, postal money order, or credit card.
  4381.      VISA and Mastercard are accepted.
  4382.  
  4383.      Checks denominated in US Dollars must be drawn on a US bank.  You may
  4384.      pay with a check denominated in other than US Dollars if you first
  4385.      add 5% to the registration fee before conversion to US Dollars at the
  4386.      prevailing exchange rate.
  4387.  
  4388.  
  4389.                          REGISTRATION INFORMATION
  4390.                                (continued)
  4391.  
  4392.      REGISTRATION BY PHONE
  4393.  
  4394.      If you are paying by credit card, you may register using our voicemail
  4395.      system weekdays at (408) 336-8080 mailbox 9090. Leave your credit card
  4396.      information and we will call you back with your registration key, usually
  4397.      the same day. You may also register via the P2 Enterprises Customer
  4398.      Service BBS. The BBS is available weeknights between 6PM and 6AM Pacific
  4399.      Time and 24 hours on weekends at (408) 336-8080. (Our voicemail and BBS
  4400.      share the phone line and computer hardware.)
  4401.  
  4402.  
  4403.      AVAILABILITY
  4404.  
  4405.      All orders are shipped within 10 working days after receipt of the
  4406.      registration fee.  Most orders are shipped within 48 hours.
  4407.                        DOS PHANTOM REGISTRATION AND ORDER FORM
  4408.     -------------------------------------------------------------------
  4409.     Remit to:   P2 Enterprises, P.O. Box 25, Ben Lomond, CA  95005-0025
  4410.     -------------------------------------------------------------------
  4411.     Qty Item                                   Price
  4412.     ===================================================================
  4413.     ___ DOS Phantom Single User PRK            @ US$40.00    US$_______
  4414.  
  4415.     ___ DOS Phantom Single User PRK + diskette @ US$44.00    US$_______
  4416.  
  4417.     ___ DOS Phantom Laser-printed Users Guide  @ US$12.00    US$_______
  4418.  
  4419.     ___ DOS Phantom Quick Reference Booklet    @  US$1.00    US$_______
  4420.         (One FREE with each registration.)
  4421.  
  4422.     ___ DOS Phantom Multi-User LAN License     @US$120.00    US$_______
  4423.         Allows unlimited use on a single LAN.  A separate
  4424.         license is required for each LAN installation.
  4425.  
  4426.     ___ DOS Phantom Commercial Distribution   @ US$240.00    US$_______
  4427.         License
  4428.         Allows unlimited distribution of the PHANTOM2.EXE
  4429.         file with another product. Other programs may not
  4430.         be distributed.
  4431.  
  4432.     ___ Borland C Phantom Programmer's Kit     @ US$180.00   US$_______
  4433.         C source code module which performs TXT2PTM translation
  4434.         for use in application programs and a play-only version of
  4435.         PHANTOM2.EXE.  No restriction on use for commercial purposes.
  4436.  
  4437.     ___ Microsoft C Phantom Programmer's Kit   @ US$180.00   US$_______
  4438.  
  4439.                                             Volume Discount  US$(______)
  4440.  
  4441.                 Outside North America
  4442.                 add $3 per diskette or users guide ordered   US$_______
  4443.  
  4444.                 California residents add state
  4445.                 and county taxes (at least 6.5%)             US$_______
  4446.  
  4447.  
  4448.      Diskette size:  ___ 3.5   ___ 5.25               TOTAL  US$_______
  4449.  
  4450.      __Visa  __Mastercard  __Amex  __Discover __DinersClub
  4451.  
  4452.      Account Number____________________________  Expir.Date____________
  4453.  
  4454.          Name__________________________________________________________
  4455.  
  4456.       Company__________________________________________________________
  4457.  
  4458.       Address__________________________________________________________
  4459.  
  4460.              ________________________________ Phone____________________
  4461.  
  4462.       Where did you obtain your copy of DOS Phantom?___________________
  4463.