home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / web_dev / files / mwjpp516.exe / %MAINDIR% / Tools / Html / AccentsToHtml.script < prev    next >
Encoding:
Text File  |  2001-06-19  |  5.5 KB  |  219 lines

  1. !!Script
  2. // Copyright ⌐ 1999 - Joune
  3.  
  4. /**
  5. @Tool: AccentsToHtml~replace French accents with HTML code. 
  6. @EndTool: 
  7. @Summary: AccentsToHtml~replace French accents with HTML code.
  8. */
  9.  
  10.  
  11. function DoCommand()
  12. {
  13.     var editor = getActiveEditor();
  14.     if (editor)
  15.     {
  16.         // └ α ┬ Γ ╚ ╔ ╩ ╦ Φ Θ Ω δ ╧ ╬ ∩ ε ╘ ⌠ ╓ ÷ ┘ ∙ █ √ ▄ ⁿ ╟ τ
  17.         var findData = editor.findFirst("└", 0, 0, true, true, true);
  18.         while (findData && findData.found)
  19.         {
  20.             editor.replace("À", findData);
  21.             editor.findNext(findData);
  22.         }
  23.         
  24.     var findData = editor.findFirst("α", 0, 0, true, true, true);
  25.         while (findData && findData.found)
  26.         {
  27.             editor.replace("à", findData);
  28.             editor.findNext(findData);
  29.         }
  30.         
  31.         var findData = editor.findFirst("┬", 0, 0, true, true, true);
  32.         while (findData && findData.found)
  33.         {
  34.             editor.replace("Â", findData);
  35.             editor.findNext(findData);
  36.         }
  37.         
  38.         var findData = editor.findFirst("Γ", 0, 0, true, true, true);
  39.         while (findData && findData.found)
  40.         {
  41.             editor.replace("â", findData);
  42.             editor.findNext(findData);
  43.         }
  44.         
  45.         var findData = editor.findFirst("╚", 0, 0, true, true, true);
  46.         while (findData && findData.found)
  47.         {
  48.             editor.replace("È", findData);
  49.             editor.findNext(findData);
  50.         }
  51.         
  52.         var findData = editor.findFirst("╔", 0, 0, true, true, true);
  53.         while (findData && findData.found)
  54.         {
  55.             editor.replace("É", findData);
  56.             editor.findNext(findData);
  57.         }
  58.         
  59.         var findData = editor.findFirst("╩", 0, 0, true, true, true);
  60.         while (findData && findData.found)
  61.         {
  62.             editor.replace("Ê", findData);
  63.             editor.findNext(findData);
  64.         }
  65.         
  66.         var findData = editor.findFirst("╦", 0, 0, true, true, true);
  67.         while (findData && findData.found)
  68.         {
  69.             editor.replace("Ë", findData);
  70.             editor.findNext(findData);
  71.         }
  72.         
  73.         var findData = editor.findFirst("Φ", 0, 0, true, true, true);
  74.         while (findData && findData.found)
  75.         {
  76.             editor.replace("è", findData);
  77.             editor.findNext(findData);
  78.         }
  79.  
  80.         var findData = editor.findFirst("Θ", 0, 0, true, true, true);
  81.         while (findData && findData.found)
  82.         {
  83.             editor.replace("é", findData);
  84.             editor.findNext(findData);
  85.         }
  86.  
  87.         var findData = editor.findFirst("Ω", 0, 0, true, true, true);
  88.         while (findData && findData.found)
  89.         {
  90.             editor.replace("ê", findData);
  91.             editor.findNext(findData);
  92.         }
  93.  
  94.         var findData = editor.findFirst("δ", 0, 0, true, true, true);
  95.         while (findData && findData.found)
  96.         {
  97.             editor.replace("ë", findData);
  98.             editor.findNext(findData);
  99.         }
  100.         
  101.         var findData = editor.findFirst("╧", 0, 0, true, true, true);
  102.         while (findData && findData.found)
  103.         {
  104.             editor.replace("Ï", findData);
  105.             editor.findNext(findData);
  106.         }
  107.  
  108.         var findData = editor.findFirst("╬", 0, 0, true, true, true);
  109.         while (findData && findData.found)
  110.         {
  111.             editor.replace("Î", findData);
  112.             editor.findNext(findData);
  113.         }
  114.  
  115.         var findData = editor.findFirst("∩", 0, 0, true, true, true);
  116.         while (findData && findData.found)
  117.         {
  118.             editor.replace("ï", findData);
  119.             editor.findNext(findData);
  120.         }
  121.         
  122.         var findData = editor.findFirst("ε", 0, 0, true, true, true);
  123.         while (findData && findData.found)
  124.         {
  125.             editor.replace("î", findData);
  126.             editor.findNext(findData);
  127.         }
  128.         
  129.         var findData = editor.findFirst("╘", 0, 0, true, true, true);
  130.         while (findData && findData.found)
  131.         {
  132.             editor.replace("Ô", findData);
  133.             editor.findNext(findData);
  134.         }
  135.         
  136.         var findData = editor.findFirst("⌠", 0, 0, true, true, true);
  137.         while (findData && findData.found)
  138.         {
  139.             editor.replace("ô", findData);
  140.             editor.findNext(findData);
  141.         }
  142.         
  143.         var findData = editor.findFirst("╓", 0, 0, true, true, true);
  144.         while (findData && findData.found)
  145.         {
  146.             editor.replace("Ö", findData);
  147.             editor.findNext(findData);
  148.         }
  149.         
  150.         var findData = editor.findFirst("÷", 0, 0, true, true, true);
  151.         while (findData && findData.found)
  152.         {
  153.             editor.replace("ö", findData);
  154.             editor.findNext(findData);
  155.         }
  156.         
  157.         var findData = editor.findFirst("┘", 0, 0, true, true, true);
  158.         while (findData && findData.found)
  159.         {
  160.             editor.replace("Ù", findData);
  161.             editor.findNext(findData);
  162.         }
  163.  
  164.         var findData = editor.findFirst("∙", 0, 0, true, true, true);
  165.         while (findData && findData.found)
  166.         {
  167.             editor.replace("ö", findData);
  168.             editor.findNext(findData);
  169.         }
  170.  
  171.         var findData = editor.findFirst("█", 0, 0, true, true, true);
  172.         while (findData && findData.found)
  173.         {
  174.             editor.replace("Û", findData);
  175.             editor.findNext(findData);
  176.         }
  177.  
  178.         var findData = editor.findFirst("√", 0, 0, true, true, true);
  179.         while (findData && findData.found)
  180.         {
  181.             editor.replace("û", findData);
  182.             editor.findNext(findData);
  183.         }
  184.  
  185.         var findData = editor.findFirst("▄", 0, 0, true, true, true);
  186.         while (findData && findData.found)
  187.         {
  188.             editor.replace("Ü", findData);
  189.             editor.findNext(findData);
  190.         }
  191.  
  192.         var findData = editor.findFirst("ⁿ", 0, 0, true, true, true);
  193.         while (findData && findData.found)
  194.         {
  195.             editor.replace("ü", findData);
  196.             editor.findNext(findData);
  197.         }
  198.  
  199.         var findData = editor.findFirst("╟", 0, 0, true, true, true);
  200.         while (findData && findData.found)
  201.         {
  202.             editor.replace("Ç", findData);
  203.             editor.findNext(findData);
  204.         }
  205.  
  206.         var findData = editor.findFirst("τ", 0, 0, true, true, true);
  207.         while (findData && findData.found)
  208.         {
  209.             editor.replace("ç", findData);
  210.             editor.findNext(findData);
  211.         }
  212.  
  213.         editor.setActive("Accents To HTML");
  214.     }
  215. }
  216.  
  217. !!/Script
  218.  
  219.