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

program ObjectInspector;

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

var
  ObjectInspectorForm: TCustomForm;
  PropList, EditControl: TComponent;
begin
  ObjectInspectorForm := GetObjectInspectorForm;
  if ObjectInspectorForm = nil then
  begin
    Writeln('ObjectInspector NOT Found.');
    Exit;
  end;

  PropList := ObjectInspectorForm.FindComponent('PropList');
  if (PropList = nil) or not PropList.ClassNameIs('TInspListBox') then
  begin
    Writeln('PropList NOT Found.');
    Exit;
  end;

  EditControl := PropList.FindComponent('EditControl');
  if (EditControl = nil) or not EditControl.ClassNameIs('TPropInspEdit') then
  begin
    Writeln('EditControl NOT Found.');
    Exit;
  end;

  if EditControl is TEdit then
  begin
    Writeln('Current Selected Property Value is: ' + TEdit(EditControl).Text);
  end;  
end.
 
