Windows Scripting
Host Control for Delphi screenshots.
After launch of demo app - before running script:
After running script, moving mouse and clicking buttons:
How many strings of code contains this demo, you think? Here
is source:
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterClasses([TButton, TPanel, TEdit, TLabel, TTimer, TDateTimePicker, TMemo]);
SC.ScriptLng:= slVBScript;
SC.ScriptTimeout:= -1;
SC.RegisterClass('Self', Self);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
SC.AddCode(Memo1.Text);
Self.OnClose:= SC.OnCloseHandler;
SC.RunProc('Main');
Button2.Enabled:= True;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
SC.ExecuteStatement(Memo2.Text);
end;
end.
|