home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / SCREEN / GRBTXT11.ZIP / GRABTEXT.DOC < prev   
Encoding:
Text File  |  1991-06-27  |  12.9 KB  |  249 lines

  1.  
  2.                     GrabText, Version 1.10, May 1991
  3.         A Mouse Cut-And-Paste Utility for IBM-PC's and compatibles
  4.                    Copyright (C) 1991 Scott Drellishak
  5.                           All Rights Reserved
  6.  
  7.         From perusing other programs' documentation, I gather that
  8.         I should say that IBM and IBM-PC are registered trademarks
  9.         of International Business Machines, Inc.  If I've missed any
  10.         other trademarks, I hope that whoever owns them forgives me.
  11.  
  12.  
  13.                               Description
  14.  
  15.         GrabText is a TSR program which allows you to grab text from
  16.         the screen and then send it as if you had typed the characters
  17.         from the keyboard.  It was inspired by the cut-and-paste
  18.         abilities of the xterm terminal emulator (which is part of
  19.         the X Window System, which is probably a registered trademark
  20.         of either MIT or DEC).  This program is the answer to a long-
  21.         standing question for most PC users with mice:  "What good
  22.         is my mouse when many programs don't support one?"
  23.  
  24.         GrabText is free, and freely distributable.  However, if
  25.         you use the program a lot and like it, please consider sending
  26.         a donation to the address below (read the section "Begging
  27.         and Stuff").
  28.  
  29.         The "GrabText.com" program, when run, loads itself into memory,
  30.         and you're all set.  It uses about 6k of memory, plus the size
  31.         of the cut buffer (this would be less if I had written it in
  32.         assembly language rather than C.  Maybe in a future version).
  33.         It has five command-line options:
  34.  
  35.           GrabText [-b <size>] [-p <size] [-nocheck] [-safe] [-off]
  36.  
  37.         "GrabText -b <size>", where size is an integer, sets the
  38.         size of the cut buffer (the memory where the text you cut
  39.         from the screen).  The default buffer size is 2000 bytes,
  40.         which is enough to hold a full screen of 80 x 25 characters.
  41.  
  42.         "GrabText -p <size>", where size is an integer, sets the
  43.         number of characters to be pushed onto the keyboard buffer
  44.         during each clock tick (1/18 of a second).  The default
  45.         push block size is 8.  You may want to use a lower value if
  46.         a program you use is dropping characters pushed by GrabText.
  47.         Note that using a value of blocksize larger than the size
  48.         of your keyboard buffer (which is 16, unless you use some
  49.         neat program to change it) will _always_ cause characters
  50.         to be dropped.  Try it and see what I mean.
  51.  
  52.         "GrabText -nocheck" tells GrabText not to check and see if
  53.         it is already installed in memory.  Normally, GrabText puts
  54.         a "magic cookie" value in the ICA when it starts up.  If
  55.         you then try to install GrabText in memory again, it notices
  56.         that it has already been installed once, and refuses.  This
  57.         method isn't perfect (if another program uses the ICA area
  58.         in memory, the cookie may get clobbered), but it seems to
  59.         work pretty well.
  60.  
  61.         "GrabText -safe" turns off the text-mode mouse cursor during
  62.         highlighting.  This assures that reverse-video junk is not left
  63.         on the screen when the user moves the mouse while selecting a
  64.         region of text, a probelm which occurs on slower machines.
  65.         If you see this mess on your screen when using GrabText with
  66.         no command-line options, use the -safe option.
  67.  
  68.         "GrabText -off" starts up GrabText with the mouse cursor off,
  69.         rather than on.  This is useful if your autoexec.bat startup
  70.         file prints out enough stuff to make the screen scroll (see
  71.         below for a note about the mouse cursor and scrolling).
  72.  
  73.         GrabText will only work in text modes.  When the computer
  74.         enters a graphics mode, GrabText will not operate.  This is
  75.         necessary because (a) I didn't want GrabText to interfere
  76.         with programs which actually use the mouse, many of which
  77.         run in graphics modes, and (b) there's no way to grab text
  78.         off the screen when the text is in fact a bunch of pixels.
  79.         Pattern matching fonts is a little beyond the scope of a
  80.         TSR.
  81.  
  82.  
  83.                                 Use
  84.  
  85.         After GrabText is running, the mouse buttons perform the
  86.         following functions:
  87.  
  88.         Left Button:    Select text
  89.         Right Button:   Paste text into the keyboard buffer
  90.         Middle Button:  Toggle cursor on an off
  91.  
  92.         For those of you without a middle button, what were you thinking
  93.         when you bought your mouse?  In any case, you can toggle the
  94.         cursor on and off by pressing the left and right buttons
  95.         simultaneously.  Note that if the cursor is off and you press
  96.         the left button to select some text, the cursor automatically
  97.         comes back on.
  98.  
  99.         To select text, position the mouse cursor at one end of the text
  100.         you want to highlight, press the left button, and drag the cursor
  101.         until the section of text you wish to select is highlighted.
  102.         When you release the left button, the selected text will flash
  103.         several times, and the highlighting will disappear.  If you wish
  104.         to select a single word (made up of alphanumeric characters),
  105.         double-click on the word with the left button.  Now, you can
  106.         paste the selected text into the keyboard buffer, just as if
  107.         you had typed the text in from the keyboard, by pressing the
  108.         right button.  Note that you can paste the selected text any
  109.         number of times, until you select another block with the left
  110.         button.
  111.  
  112.         For those of you who worry, yes, you can select a block of text
  113.         bigger than the keyboard buffer without overflowing, as long
  114.         as the program running is reading keystrokes.  For instance,
  115.         if you're in the terminal mode of your favorite communications
  116.         program, you can select a big block of text and send the whole
  117.         thing at once, since GrabText only sends a few characters of the
  118.         selected text every clock tick (an 18th of a second, if I recall).
  119.         All but the most cheesily written programs should read characters
  120.         faster than this, so, no overflow.
  121.  
  122.         And there you have it.
  123.  
  124.  
  125.                           Revision History
  126.  
  127.         version         New features, bugs fixed
  128.         -----------------------------------------------------------------
  129.         [0.0, 1.0)      Didn't work right.
  130.         1.0             Worked (not quite so) fabulously well
  131.         1.01            Fixed problems with MicroSoft mice
  132.         1.10            Added buffer size and push block size command
  133.                         line options, as well as the check for previous
  134.                         installation and -nocheck command line option.
  135.  
  136.  
  137.                      Interesting Stuff, and Caveats
  138.  
  139.         Rather than have the usual "answers to frequently asked (but
  140.         really simple minded) questions" list here, I'll give you a
  141.         quickie overview of how GrabText works, so you can answer
  142.         the questions yourself.
  143.  
  144.         GrabText reads characters directly from the frame buffer of
  145.         the screen.  This means that you get exactly what you see on
  146.         the screen.  Among other things, this means you can't have
  147.         GrabText send function key combinations (unless you get really
  148.         clever, and put NULs into the frame buffer directly, or some-
  149.         thing).  If you try to pick up more that one line of text, you
  150.         also get all the spaces on the beginning and end of the lines,
  151.         and there is no newline put in if you wrap around the edge of
  152.         the screen.  Perhaps in a future version I'll fix it so that
  153.         it stops at the end of each line and inserts a newline, like
  154.         xterm does.
  155.  
  156.         GrabText inserts characters directly into the keyboard buffer
  157.         currently in use by the BIOS, which is pointed to by two
  158.         pointers in low memory whose exact addresses escape me.
  159.         Look it up in that book with that "Hey, my arms are folded"
  160.         guy on the cover.  Since it only pastes a fwe characters per
  161.         clock tick, you can hold down a key and paste a chunk of
  162.         text, and have the keyboard characters in between the
  163.         pasted text.  I consider this a big feature, and so should
  164.         you.
  165.  
  166.         Since the mouse cursor in text modes is created by reverse-
  167.         videoing a character cell, the highlighting can interfere
  168.         with the cursor in cases where you move the cursor faster
  169.         than the highlight updates (this is pretty fast, even on
  170.         a slow machine).  But, if you time it just right, you can
  171.         make the cursor leave highlight-garbage on the screen.
  172.         If you use the -safe option, this problem goes away, but
  173.         be aware that the cursor is no longer visible when you
  174.         select text, so the size of the highlighted area will be
  175.         one character cell different when the -safe option is
  176.         used.  This isn't too much of a problem if you either
  177.         use or don't use -safe consistently, but it can be dis-
  178.         concerting if you switch it on and off.
  179.  
  180.         It turns out that if the screen scrolls while the mouse
  181.         cursor is visible, the visible cursor gets moved up one line,
  182.         and this never gets erased (try it yourself to see what I
  183.         mean).  I could find no solution to this problem, except
  184.         to catch the BIOS screen scrolling call, and turn the mouse
  185.         cursor off during a scroll.  Unfortunately, scrolling is
  186.         one of the things handled by screen device drivers like
  187.         ANSI.SYS, so this solution only works when no such device
  188.         driver is loaded.  If anyone has a solution to this problem
  189.         (specifically, how can I know when the screen is scrolling
  190.         regardless of whether it's due to a BIOS call, or a device
  191.         driver?), you can contact me at either of the addresses
  192.         below.  Help is greatly appreciated.
  193.  
  194.  
  195.                           Begging and Stuff
  196.  
  197.         I originally wrote this program to pass the time and
  198.         learn how to do TSRs in C, but I liked it so much that
  199.         I debugged it and made it not crash (which is no small
  200.         task when you can't even send a printf message to the
  201.         screen for debugging).  I'm releasing this as "begware".
  202.         That is, I worked quite a bit on this program, and if
  203.         you like it, I'd appreciate it if you'd send cash or check
  204.         (made out to Scott Drellishak) to:
  205.  
  206.                     GrabText
  207.                     827 Santa Anita Ave.
  208.                     San Marino, CA  91108
  209.                     Internet mail: sfd@cory.berkeley.edu
  210.  
  211.         I suggest 10 dollars, but it's up to you.  You are under
  212.         no obligation to do so -- the donation is purely voluntary.
  213.         I put that "Copyright...All Rights Reserved" at the top
  214.         because it seemed like a good idea, but you are free to
  215.         distribute this by any means you like, as long as you
  216.         (a) include this documentation file with the program when
  217.         you distribute it, (b) do not, in any way, alter this
  218.         file or the GrabText program (GRABTEXT.COM), and (c) do
  219.         not charge more than the cost of packaging the program,
  220.         if you are distributing it on disk or other media.  I'd
  221.         really appreciate it if you'd spread this program around,
  222.         either on bulletin boards, networks, or by sneakernet.
  223.  
  224.         This is the first released version of GrabText, so
  225.         expect bugs.  The likelihood of there being more versions
  226.         without those bugs, and more features, depends on the
  227.         generosity of users like you (hint, hint).  If no one
  228.         expresses an interest, I probably won't spend the time
  229.         (unless I get really bored).
  230.  
  231.         Finally, please be aware that GrabText has NOT been tested
  232.         extensively, because I don't have the machines or the software
  233.         to test all sorts of odd permutations and combinations.  If
  234.         you use the program, you run the risk of it, say, getting
  235.         confused by the network driver you have running, and erasing
  236.         the contents of your harddisk at an innopportune time.
  237.         I AM NOT RESPONSIBLE FOR ANY DAMAGE CAUSED BY THIS PROGRAM.
  238.         Be especially careful when using other TSR programs that use
  239.         the timer interrupt, other programs that play games with the
  240.         keyboard buffer, and other programs that use the mouse.
  241.         You should also be aware that there are bad people out there
  242.         who will ignore part (b) above and put a virus into this program
  243.         -- if you don't check the program for viruses, logic bombs,
  244.         trojan horses, etc. before you run it, don't blame me if
  245.         there is one.  Basically, run this program at your own risk.
  246.  
  247.  
  248.                  GOOD LUCK!  GOOD GRABBING!  SEND MONEY!
  249.