home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / PROGRAMS / WSTAR / YANKBACK.TXT < prev   
Text File  |  2000-06-30  |  6KB  |  105 lines

  1.  
  2.            -={ RETRIEVING DELETED TEXT IN WORDSTAR }=-
  3.  
  4.                       by Laurie J. Braaten
  5.  
  6. Anyone  who  has worked with WordStar for any length of time  has 
  7. probably  had the misfortune of deleting the wrong line or  block 
  8. of text.  By some fancy manuevering, you might be able to recover 
  9. the  text  from your backup file.   If you  have  a  photographic 
  10. memory, you may be able to retype it in no time.  But if these do 
  11. not  work,  you  should  be set for a frustating time  trying  to 
  12. reconstruct  your  lost data.   Now you can  avoid  this  problem 
  13. altogether by adding a "Yankback" feature to WordStar.   This can 
  14. be  done quite simply with a series of command strings ("macros") 
  15. which  I call "WS Yankback," set up in a key definition  program.  
  16. (The  more  popular commercial key definition  programs  such  as 
  17. Smartkey,  Xtrakey  and  the Backgrounder have been  reviewed  by 
  18. Glenn  Grant in the December 1985 issue of  PROFILES.   KSSTROKES 
  19. 4.0,  QWIKEY21,  &  GKEY2 are  public domain programs which  give 
  20. good, but more limited results.)
  21.  
  22.                     HOW TO SET UP WS YANKBACK
  23.  
  24. FIRST,  set  up four macros which will now be used to delete text 
  25. in place of their WordStar counterparts.  The first will delete a 
  26. line.  The second will delete a block of text.  The third deletes 
  27. text  left of the cursor;  the fourth deletes text right  of  the 
  28. cursor.   All macros should be entered as continuous text without 
  29. spaces.   The  ^ symbol is the control key,  held down while  you 
  30. type the key which follows it; <cr> is a carriage return (or ^M).
  31.  
  32. MACRO #1:  ^QS^KB^X^S^KK^KWA:YANKEE<cr>Y^KY
  33. MACRO #2:  ^KWA:YANKEE<cr>Y^KY
  34. MACRO #3:  ^KK^QS^KB^KWA:YANKEE<cr>Y^KY 
  35. MACRO #4:  ^KB^X^QS^S^KK^KWA:YANKEE<cr>Y^KY 
  36.  
  37. SECOND, enter the yankback command: 
  38.  
  39. MACRO #5:  ^KRA:YANKEE<cr>
  40.  
  41. THIRD,  on your WordStar disk,  open a file named "YANKEE."  This 
  42. is  where  your deleted text will be stored.   This file will  be 
  43. overwritten  every time you delete text,  so it does  not  matter 
  44. what you type in it--a  single character will do.   But make sure 
  45. that  you  have adequate disk space for any text you may want  to 
  46. delete (2K-6K should be plenty for most operations). 
  47.  
  48. Now, when you want to delete a line, use macro #1.  It works just 
  49. like ^Y: place the cursor anywhere on a line and use it to delete 
  50. the  entire  line.   If you want to yank back the  deleted  line, 
  51. execute macro #5.  When deleting a block of text, use macro #2 in 
  52. the  same way you would use ^KY.   Mark the beginning and end  of 
  53. the block with ^KB and ^KK respectively,  and execute macro #2 to 
  54. delete  the marked block.   If the block needs to  be  recovered, 
  55. macro  #5 will yank it back.   Numbers 3 and 4 work like  ^Q<del> 
  56. and  ^QY--only  now  the deleted text can be retrieved  with  the 
  57. yankback command.   (Macro #1 leaves a blank line where the  text 
  58. has  been  removed.   If this is undesirable simple omit  the  ^S 
  59. after the ^X.)
  60.  
  61. Before  using  WS Yankback,  be sure to test it  thoroughly.   If 
  62. there  are  errors in the way the macros were entered  you  could 
  63. lose  more text than you planned to delete,  and not be  able  to 
  64. recover  it.   Use a practice file and check all of the commands.  
  65. If  they do not work,  carefully recheck the macros to make  sure 
  66. they have been entered correctly.
  67.  
  68. N.B.  The  yankback  command WILL NOT WORK if you  use  ^Y,  ^KY, 
  69. ^Q<del> or ^QY to delete text.   The four macros given above must 
  70. be  used instead of these WordStar commands for the  yankback  to 
  71. recover the deleted text.
  72.                       HOW WS YANKBACK WORKS
  73.  
  74. WS  Yankback  simply writes the deleted text onto the file  named 
  75. YANKEE,  and  then deletes it from the working  text.   When  the 
  76. yankback  is  used,  the text is read back into your file at  the 
  77. present position of the cursor.   This operation takes some time, 
  78. which  is  its major drawback.   When deleting  blocks  of  text, 
  79. however,  it  may  be worth the extra time to have the  assurance 
  80. that the data can be recovered.   Since WS Yankback always writes 
  81. the deleted line on the text YANKEE,  the recovery operation will 
  82. ONLY  WORK  FOR  THE  LAST  DELETION--you  cannot  retrieve   any 
  83. materials deleted before the last text was deleted.  
  84.  
  85.                          WHAT ABOUT ^Y ?
  86.  
  87. If you decide to use the first macro in place of ^Y, you may find 
  88. that  you still have problems with ^Y.   You may accidentally hit 
  89. ^Y when you want a ^T,  or you may attempt to type an upper  case 
  90. "Y"  (which,  believe  or  not,  I use quite often) and  hit  the 
  91. control key instead of the shift key.  I have solved this problem 
  92. by following Ted Silveira's advice in PROFILES, July/August 1985, 
  93. p.  44.   Using DDT (etc.) or Winstall's custom patch "+"  (which 
  94. does not appear on the options menu), you may change address 054D 
  95. (0535  in WordStar 3.0) to read "19 19" (hex) instead of "19 00."  
  96. The  result  is that it now takes TWO ^Ys (or ^YY)  to  delete  a 
  97. line,  minimizing the possibilities for an accident.   Now when a 
  98. ^Y  is  hit  by mistake,  the space bar will get you out  of  the 
  99. partially executed command.   If you find yourself rapidly typing 
  100. two  or  more ^Ts without looking at either the keyboard  or  the 
  101. results onscreen,  you may want to try Melvyn Halbert's solution, 
  102. found  on  the Tampa Bay KUG board (813-791-1454).   He  suggests 
  103. changing the "19" at the appropriate address to "1C" (hex), which 
  104. will reassign the delete line function to ^\ instead of ^Y. 
  105. nging the "19" at the