/* Autodoc Function Finder */ /* Notes: 1. We need to make sure that the autodoc we want is not already loaded. If it is, then we can just go to it. */ OPTIONS RESULTS 'RequestStr prompt "Enter function name "' /* Note: from here on down, both FindAutoDoc.ttx and FindAutoDocWord.ttx are identical. */ if (RC > 0) then do exit end funcname = result hostname = address() portname = 'Index Finder' if ~show('p',portname) then do address COMMAND 'RUN >NIL: 0 then do docname = substr(docname,lastslash+1) end lastslash = LastPos("/",docname) if lastslash > 0 then do docname = substr(docname,lastslash+1) end GetPort name docname fileport = RESULT if (RC > 0) then do /* If the source file was not found... */ OpenDoc name docfile fileport = RESULT /* get the port */ if RC > 0 then do /* if not there, then error */ 'SetStatusBar "Error: error opening doc file."' address command "Wait 6" exit end end address value fileport IconifyWindow OFF Window2front ActivateWindow MoveEOF Move docline 0 exit end else do address value hostname 'SetStatusBar "Error: Index Finder Error"' end