home *** CD-ROM | disk | FTP | other *** search
- /* AREXX-script for CygnusEd. Displays the autodoc entry for
- the function the cursor is on.
- Version 1.1, written 30.04.93 by Christian Stieber
- This script is placed in the public domain. */
-
- /* Change this to reflect your system */
-
- /* Name of the crossreference file */
- CrossReferenceFile='man:AutoDocs/.autodoc.xref'
-
- /* The AmigaGuide executable */
- AmigaGuide='SYS:Utilities/AmigaGuide'
-
- /* The name of the screen to open the AmigaGuide window on */
- PubScreenName='"`Work:MoreCommands/GetPubName`"'
-
-
- /****************************************************************************/
-
- options results
- status 55 /* get current line */
- Name=Result
- status 87 /* get cursor column */
- x=Result+1
- do while x>0 /* find beginning of word */
- Char=upper(substr(Name,x,1))
- if ~((Char>='A' & Char<='Z') | (Char>='0' & Char<='9') | (Char='_') | (Char='.')) then break
- x=x-1
- end
- Name=delstr(Name,1,x) /* delete everything in front of the word */
- x=1
- do forever /* find end of word */
- Char=upper(substr(Name,x,1))
- if ~((Char>='A' & Char<='Z') | (Char>='0' & Char<='9') | (Char='_')) then break
- x=x+1
- end
- Name=delstr(Name,x) /* delete everything after the word */
- if (Name~='')
- then do
- if ~show('l','amigaguide.library') then call addlib('amigaguide.library',0,-30)
- Dummy=LoadXRef(CrossReferenceFile)
- Node=GetXRef(Name)
- if Node~=10
- then do
- parse VAR Node . DataBase Type Line
- address 'COMMAND' 'run >NIL:' AmigaGuide DataBase 'DOCUMENT' Name 'PUBSCREEN' PubScreenName 'REQUESTER'
- end
- else do
- okay1 'No information on "'Name'"'
- end
- end
- exit 0
-