Sort Quote Page

This script will remove the duplicate symbols on the custom quote page you pass as the string parameter.   Of course, you can assign this to respond to any of the number buttons instead of 1, and you can pass the name of any quote page.   The quote pages are located in the folder referenced by sPath, and they have a '.quo' extension.

procedure RemoveDup(s: string);
var i: integer;
begin
  sList.LoadFromFile(sPath+s);          {load file into a string list}
  sList.sorted:=true;                   {sort the string list}
  for i:=pred(sList.count) downto 1 do  {delete duplicates}
    if sList.strings[i]=sList.strings[pred(i)] then sList.delete[i];  
  sList.SaveToFile(sPath+s);            {resave quote file}
end;

{----- MAIN PROGRAM -----}
begin
  if Who=1 then RemoveDup('Custom.quo');
  {change the name to the quote page you want to clean up}
end;

Cut and paste the script into the script editor.   Save As to a file name of your choice.   Run the script by clicking the #1 button.   Then, open your named quote page and observe that the duplicates were removed.