home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Editor / DVD!FX17.LHA / FrexxEd / fpl / CHelp.FPL < prev    next >
Encoding:
Text File  |  1995-03-17  |  792 b   |  30 lines

  1. /* CHelp script for FrexxEd - Lookup keywords in includes and
  2.  * autodocs using CHelp.
  3.  *
  4.  * Written by Mathias Axelsson 940209
  5.  * Updated 940924 to work without any external ARexx script
  6.  *
  7.  */
  8.  
  9. export CHelp_lookup()
  10. {
  11.  string a, res;
  12.  int  newid, oldid;
  13.  
  14.  a = GetWord();
  15.  if (strlen(a) == 0)
  16.   a = PromptString("", "Request", "Please enter lookup keyword");
  17.  
  18.  res = ARexxSend("CHELP1", joinstr("lookup ", a), 60);
  19.  if (!strcmp(res, "1"))
  20.  {
  21.   oldid = GetEntryID(); /* Save current view id */
  22.   newid = New();    /* Create new view */
  23.   Activate(newid, 1);  /* Split current view into two parts */
  24.   CurrentBuffer(newid); /* Activate new view */
  25.   SetInfo(newid, "tab_size", 8);
  26.   Load("T:chelp.lup");  /* Load lookup file into view */
  27.   CurrentBuffer(oldid); /* Activate old view */
  28.  }
  29. }
  30.