home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Editor / DVD!FX17.LHA / FrexxEd / fpl / SameName.FPL < prev    next >
Encoding:
Text File  |  1995-02-19  |  692 b   |  22 lines

  1.  
  2. export int SameName_hook(string filename, int BufferID)
  3. {
  4.   int ret=0;
  5.  
  6.   if (!Stricmp(filename, ReadInfo("full_file_name", BufferID))) {
  7.     ret=Request(joinstr("Do you want to load '", filename, "' again?"), "Same path!", "Yes!|..and kill the old!|Activate the old!|Ooops!");
  8.     if (ret==2)
  9.       Clean(joinstr("Kill(", itoa(BufferID), ");"));
  10.   } else {
  11.     ret=Request(joinstr("Do you want to load another file\ncalled '", ReadInfo("file_name", BufferID), "' ?"), "Same name!", "Why not!|Not in this life!");
  12.   }
  13.   if (ret==3) {
  14.     ExecuteLater(joinstr("CurrentBuffer(Activate(GetEntryID(\"", filename, "\")));"));
  15.     ret=0;
  16.   }
  17.   return(!ret);
  18. }
  19.  
  20.  
  21. Hook("SameName", "SameName_hook");
  22.