{*******************************************************}
{                                                       }
{       Pascal Script Source File                       }
{       Run by RemObjects Pascal Script in CnWizards    }
{                                                       }
{       Generated by CnPack IDE Wizards                 }
{                                                       }
{*******************************************************}

program EnvOption;

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ToolsAPI, CnWizUtils, CnWizIdeUtils;

var
  Options: IOTAEnvironmentOptions;
  Strs: TStringList;
  I: Integer;

begin
  Options := CnOtaGetEnvironmentOptions();
  if Options = nil then Exit;
  Strs := TStringList.Create;

  CnOtaGetOptionsNames(Options, Strs, False);
  Writeln('');
  Writeln(Format('Environment Options Total %d', [Strs.Count]));

  for I := 0 to Strs.Count - 1 do
    Writeln(Strs[I] + ': ' + string(Options.GetOptionValue(Strs[I])));

  if Strs.IndexOf('EnabledProp') >= 0 then
  begin
    InfoDlg('Will Disable IDE Structural Highlight.');
    Options.SetOptionValue('EnabledProp', False);
  end;
  Strs.Free;
end.