home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / E / TFF-A32R.LZX / AmigaE3.2a / Rexx / ADocLookup.rx next >
Encoding:
Text File  |  1996-06-06  |  799 b   |  40 lines

  1. /*
  2.  
  3. example script for ee
  4. load an autodoc according to the word under the cursor from a filelist which
  5. looks like this:
  6.  
  7. funcname autodocfile [linenumber]
  8.  
  9. OpenWindow autodocs:intuition/intuition.h 42
  10.  
  11. idea and first draft by Gregor Goldbach
  12.  
  13. */
  14.  
  15. address 'EE.0'
  16. options results
  17.  
  18. arg datname
  19.  
  20. if datname="" then datname="EE:rexx/autodoc/autodoclist.ee"
  21.  
  22. if open(autodoclist, datname, 'R') then
  23.   do
  24.     'lockwindow'
  25.     'getword'
  26.     funcname=result
  27.     posi=index(funcname, '(')
  28.     if posi>0 then funcname=left(the_word, posi-1)
  29.     do until (word(the_line,1)=funcname)=1 | eof(autodoclist)
  30.       the_line=readln(autodoclist)
  31.       say the_line
  32.     end
  33.     the_file=word(the_line,2)
  34.     'opennew' the_file
  35.     'gotoline' word(the_line, 3)
  36.     'unlockwindow'
  37.   end
  38. else
  39.   say 'Could not open file.'
  40.