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

program EditorMenu;

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

const
  SW_SHOW = 1;

procedure Execute(Sender: TObject);
begin
  InfoDlg('Will Open ' + CnOtaGetCurrentSourceFile + ' using Notepad.');
  WinExecute('Notepad.exe "' + CnOtaGetCurrentSourceFile + '"', SW_SHOW);
end;

var
  Executor: TCnContextMenuExecutor;
begin
  Executor := TCnContextMenuExecutor.Create;
  Executor.Caption := 'Open File in External Editor';
  Executor.OnExecute := @Execute;
  RegisterEditorMenuExecutor(Executor);
end.

