home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d7xx / d770 / uedit.lha / Uedit / RogerHand.LZH / Clear-F5 next >
Text File  |  1991-03-28  |  3KB  |  78 lines

  1. This is my command to clear all regions.  I include it for two reasons:
  2.  
  3. 1. You'll have to make your clear region command set variables n66 and/or n67
  4. to 0.  I don't use separate clear hi-lite and clear reverse commands, just
  5. one command to clear both.  I use the two mentioned variables to keep track
  6. of whether you're putting the first or second mark to deliniate a region.
  7.  
  8. 2. You can see how the book mark stuff fits in with a command!
  9.  
  10. <normal-F5:
  11.  
  12. ..BOOKMARKS   (Roger Hand)
  13.  
  14.     ..If tilda key has been pressed ONCE, we're in GOTO bookmark mode    
  15.  
  16.     if(eqNum(n75,5))
  17.  
  18.       {
  19.        equateLoc(curfile,locA,atCursor)   .. save in case we go back (^1)
  20.        moveCursor(curfile,locF ) .. * = C for F2, etc.  See below
  21.         equateNum(n75,14)       ..x = 0 for F1, 1 for F2, etc.
  22.         return
  23.       }
  24.  
  25.     ..If we just pressed GOTO F-key and haven't moved cursor, we're still
  26.     .. in GOTO mode
  27.   if((!eqNum(n75,20))&(!eqNum(n75,0)))  ..If not, jump down to SET
  28.    {if((eqNum(n75,10)) & (eqLoc(curfile,atcursor,sfile))) equateNum(n75,77)
  29.     if((eqNum(n75,11)) & (eqLoc(curfile,atcursor,locC))) equateNum(n75,77)
  30.     if((eqNum(n75,12)) & (eqLoc(curfile,atcursor,locD))) equateNum(n75,77)
  31.     if((eqNum(n75,13)) & (eqLoc(curfile,atcursor,locE))) equateNum(n75,77)
  32.     if((eqNum(n75,14)) & (eqLoc(curfile,atcursor,locF))) equateNum(n75,77)
  33.     if((eqNum(n75,15)) & (eqLoc(curfile,atcursor,locG))) equateNum(n75,77)
  34.     if((eqNum(n75,16)) & (eqLoc(curfile,atcursor,locH))) equateNum(n75,77)
  35.     if((eqNum(n75,17)) & (eqLoc(curfile,atcursor,locI))) equateNum(n75,77)
  36.     if((eqNum(n75,18)) & (eqLoc(curfile,atcursor,locJ))) equateNum(n75,77)
  37.     if((eqNum(n75,19)) & (eqLoc(curfile,atcursor,efile))) equateNum(n75,77)
  38.        
  39.          if(eqNum(n75,77))     ..If we're still in GOTO mode . . .
  40.        {
  41.         equateLoc(curfile,locA,atCursor)   .. save in case we go back (^1)
  42.         moveCursor(curfile,locF )  ..loc* = locC for F2, locD for F3, . . 
  43.                                     .. . . locJ for F9 . . 
  44.                                     .. . . sfile for F1, efile for F10
  45.  
  46.         equateNum(n75,14)        ..x = 0 for F1, 1 for F2, etc.
  47.         return
  48.        }
  49.  
  50. ..If NOT still in GOTO mode . . .      
  51. ..If F-key more than once, with cursor movement in between, cancel
  52. .. goto mode
  53.  
  54.     equateNum(n75,0) putMsg("Function Keys back to Normal!")
  55.   }
  56.  
  57. ..If tilda key has been pressed TWICE, we're in SET bookmark mode
  58.  
  59.     if(eqNum(n75,20))
  60.  
  61.        {equateLoc(curfile,LocF,atCursor)
  62.         equateNum(n75,0)
  63. putMsg("Function Keys back to Normal!")
  64.  
  65.         return
  66.        }
  67.  
  68.  
  69.  equateLoc(curfile,sHilite,eHilite)
  70.  equateLoc(curfile,sInvert,eInvert) refreshDisplay
  71.  equateNum(n66,0)
  72.  equateNum(n67,0)
  73.  equateNum(n75,0)          ..kill using F-keys to set/goto bookmarks
  74.  putMsg("Regions Cleared")
  75.  
  76. >
  77.  
  78.