home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 164.lha / ARexx / TXed_ARexx / markit.txed < prev    next >
Text File  |  1988-04-28  |  2KB  |  46 lines

  1. /* Start a Ref entry */
  2. /* Note: ST D only returns a directory if a directory is present in the
  3.    TxEd file requestor, so be sure to have the directory specified in
  4.    the file requestor before calling this routine.
  5.    To use simply open up a file with the reference you want, move the cursor
  6.    to the beginning of your desired reference text. Then call this macro
  7.    with the reference word as a parameter. The information will be appended
  8.    to the file 's:txed.ref'. Then move the cursor to the end of the reference
  9.    text and call the macro 'endit'. Endit will complete the entry into the 
  10.    file 's:txed.ref'. Now whenever you wish to retrieve the reference text
  11.    simply position the cursor anywhere on the reference word and call the
  12.    macro 'ref'. Ref will open another txed window and insert the reference
  13.    text into it. Ref requires use of the macro 'lookitup'. That's it! User
  14.    definable on-line help for any reference you like. Especially useful for
  15.    commented include files and autodocs. You may wish to put 'ref' and 'endit'
  16.    in your menus. Markit will not work as a menu item unless you modify to
  17.    'pull' the reference word interactively. Have fun. */
  18.  
  19. parse arg refword
  20. options results
  21.  
  22. if (exists('s:txed.ref')) then
  23.    call open(reffile,'s:txed.ref','A')
  24. else
  25.    call open(reffile,'s:txed.ref','W')
  26.  
  27. call writech(reffile,refword)
  28. call writech(reffile,'   ')
  29.  
  30. 'ST D'
  31. dir =  result
  32. if (right(dir,1) ~= ':') then
  33.    dir = dir||'/'
  34. call writech(reffile,dir)
  35.  
  36. 'ST F'
  37. call writech(reffile,result)
  38. call writech(reffile,'  @')
  39.  
  40. 'ST R'
  41. line = word(result,2)
  42. call writech(reffile,line)
  43. call writech(reffile,'@  ')
  44.  
  45.  
  46.