home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / dev / misc / FetchRefs1.3.lha / FetchRefs1.3 / Scripts / GoFetchRefs.edge < prev    next >
Encoding:
Text File  |  1996-02-24  |  1.2 KB  |  48 lines

  1. /*
  2. ** GoFetchRefs.edge - A script to interface FetchRefs with Edge
  3. **
  4. ** By Jon Rocatis, Wednesday 11-Jan-95 16:06:55
  5. **
  6. ** Extended by Anders Melchiorsen, 24-Feb-96 (hopefully still works!)
  7. */
  8.  
  9. OPTIONS RESULTS
  10. OPTIONS FAILAT 20
  11.  
  12. position eow
  13. cursor right 1
  14. copy word back resultbuff
  15. searchstr = result
  16.  
  17. function = searchstr
  18.  
  19. /* It doesn't matter whether we want a taglist, varargs og whatever function */
  20. IF RIGHT(function, 7) = "TagList" THEN
  21.     function = LEFT(function, LENGTH(function) - 7)
  22. ELSE IF RIGHT(function, 4) = "Tags" THEN
  23.     function = LEFT(function, LENGTH(function) - 4)
  24. ELSE IF RIGHT(function, 1) = "A" THEN
  25.     function = LEFT(function, LENGTH(function) - 1)
  26.  
  27. /* Define a temporary filename to put the reference into */
  28. cutat = VERIFY(function, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_")
  29. filename = 'T:FR_' || LEFT(function, MAX(0, cutat - 1))
  30.  
  31. ADDRESS 'FETCHREFS'
  32. FR_GET FIND function || '(%|Tags|TagList|A)' TO filename FILEREF
  33. gotoline = rc2
  34.  
  35. if rc == 0 then do
  36.   ADDRESS 'EDGE'
  37.   NEW
  38.  
  39.   if rc == 0 then do         /* if all is well then talk to it */
  40.     address value result
  41.     open filename
  42.   end  
  43.  
  44.   /* Delete the temp autodoc file */
  45.   ADDRESS COMMAND 'C:Delete >NIL:' filename
  46. end  
  47.  
  48.