home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 67 / IOPROG_67A.ISO / soft / Tools / mwsppv4.exe / ONUPDATEHELPOVERVIEW.SCRIPT < prev    next >
Encoding:
Text File  |  1999-12-03  |  4.4 KB  |  106 lines

  1. !!Script
  2. // Copyright ⌐ 1999 - Modelworks Software
  3.  
  4. var gOutput = getOutput();
  5. var gHelpers = getMapFile("HelpPaths.map");
  6.  
  7. function DoCommand()
  8. {
  9.     var path = File.getDocumentsPath() + "\\Index.html";
  10.     OnEvent(path);
  11. }
  12.  
  13. function OnEvent(path)
  14. {    
  15.     var htmlOut = newEditor(path);
  16.     if (htmlOut)
  17.     {
  18.         htmlOut.removeAll();
  19.         WriteHeader(htmlOut, "Help Overview");
  20.         
  21.         htmlOut.append("<ul>\n");
  22.         
  23.         var position = gHelpers.getHeadPosition();
  24.         while (position && position.valid)
  25.         {
  26.             var item = gHelpers.getNext(position);
  27.             
  28.             var href = item.value;
  29.             if (item.key.indexOf("Script Reference") > -1)
  30.             {
  31.                 href += "\\Overview.html";
  32.             }
  33.             else if (item.key.indexOf("Tools Reference") > -1)
  34.             {
  35.                 href += "\\ToolsRef.html";
  36.             }
  37.             else if (item.key.indexOf("IDE FAQ") > -1)
  38.             {
  39.                 href += "\\_FAQ.html";
  40.             }
  41.             else if (item.key.indexOf("Netscape") > -1)
  42.             {
  43.                 href += "\\index.htm";
  44.             }
  45.             else
  46.             {
  47.                 href += "\\index.html";
  48.             }
  49.             
  50.             htmlOut.append("<li><a href=\"" + href + "\">" + item.key + "<\a>\n");
  51.         }
  52.         
  53.         htmlOut.append("</ul>\n");
  54.         
  55.         WriteTrailer(htmlOut);
  56.         
  57.         htmlOut.close();
  58.         
  59.         return true;
  60.     }
  61.     
  62.     return false;
  63. }
  64.  
  65. function WriteHeader(htmlOut, name)
  66. {
  67.     htmlOut.append("<html>\n");
  68.     htmlOut.append("<head>\n");
  69.     htmlOut.append("<meta name=\"generator\" content=\"Modelworks IDE\">\n");
  70.     htmlOut.append("<title>" + name +"</title>\n");
  71.     htmlOut.append("</head>\n");
  72.     htmlOut.append("<body bgcolor=\"#ffffff\">\n");
  73.     htmlOut.append("<h2>" + name + "</h2>\n");
  74.     
  75.     var p1 = "This IDE uses the Modelworks INdex Document Search (MINDS) engine. MINDS consists of index files and a user interface in the workspace panel under the '?' tab. Subtabs are included for Documents, Content, Index, Search and Favorites views of help. The Documents view is a tree view of files included in the Documents folder. The Content view is a tree view of the contents of each index file. The Index view is a sorted list of keywords for the Active Subset. The Search view lets you search the Active Subset for matching keywords. The Favorites view lets you keep your own list of topics.";
  76.     htmlOut.append("<p>" + p1 + "</p>\n");
  77.     
  78.     htmlOut.append("<p>The following Help documents have indexes installed on your machine:</p>\n");
  79. }
  80.  
  81. function WriteTrailer(htmlOut)
  82. {
  83.     var p2 = "Content sensitive help also uses MINDS. To use it select a keyword or place the caret in a keyword and hit F1. The javaContextHelp script located in Tools/Help can use either win help or MINDS. To use MINDS turn off the option \"use win32 help\" in the preferences dialog.";
  84.     htmlOut.append("<p>" + p2 + "</p>\n");
  85.  
  86.     var p3 = "A number of index files are available for download from http://www.modelworks.com. Index files for the IDE help are included in the standard distribution.";
  87.     htmlOut.append("<p>" + p3 + "</p>\n");
  88.  
  89.     var p4 = "Index files can be used to index JavaDocs, HTML and any text based document system including source files. You can build your own index files. Scripts are included in Tools/Help/Index Generation to assist you in building your own indexes. See the readMe in that folder for details.";
  90.     htmlOut.append("<p>" + p4 + "</p>\n");
  91.  
  92.     var p5 = "Index files are built using a relative path. For MINDS to find the help documents on your machine MINDS must know the path to the documents. When first installed, all indexes attempt to set a valid documents path. For IDE related indexes the paths are local. For all others the paths are an url to online documentation. To change the help paths use the View/Help Path... dialog. You can set the paths to a local directory or to a URL. These paths are stored in the HelpPaths map file.";
  93.     htmlOut.append("<p>" + p5 + "</p>\n");
  94.  
  95.     var p6 = "You can enable/disable indexes using the Active Help Indexes menu item in the View menu. Changes made using Active Help Indexes do not take effect until you restart the IDE. You can also prevent the IDE from using MINDS by using the command line option /nominds. See Documents/Ide/How to/use command line options for details.";
  96.     htmlOut.append("<p>" + p6 + "</p>\n");
  97.  
  98.     var p7 = "The built-in help browser has its own menu bar with commands for next and back under the Browser menu. You can also use the \"Help Topic\" under the Windows menu to bring the built-in help browser to the front.";
  99.     htmlOut.append("<p>" + p7 + "</p>\n");
  100.  
  101.     htmlOut.append("</body>\n");
  102.     htmlOut.append("</html>\n");
  103. }
  104.  
  105. !!/Script
  106.