Ekas Software Windows Script Host Control for Delphi Help
|
TekWSHControl = class(TWSHScriptControl)
property OnError;
property OnTimeout;
property SafeSubset: WordBool;
property ScriptAllowUI: WordBool;
property ScriptError: IScriptError;
property ScriptLng: TekWSHLanguages;
property ScriptTimeout: integer;
Set ScriptTimeout to -1 to let the script run unlimited time without error generating.
property SitehWnd;
property State;
class procedure _About;
procedure AddCode(const Code: WideString); override;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function Eval(const Expression: WideString): OleVariant; override;
procedure ExecuteStatement(const Statement: WideString); override;
function GetOleObject(AObject: TPersistent): OleVariant;
function GetProxy(AOwner: TPersistent): IDispatch;
procedure OnActivateHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Form1.OnActivate:= ekWSHControl1.OnActivateHandler": Form1.OnActivate handling will be routed to "Form1_OnActivate()" if such procedure exists in the script)
If you will assign OnActivateHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnCanResizeHandler(Sender: TObject; var NewWidth: integer; var NewHeight: integer; var Resize: Boolean);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnCanResize:= ekWSHControl1.OnCanResizeHandler": Panel1.OnCanResize handling will be routed to "Panel1_OnCanResize()" if such procedure exists in the script)
NewWidth, NewHeight and Resize parameters of TCanResizeEvent are incapsulated in TCanResizeEventArgs class. OnCanResizeHandler procedure creates TCanResizeEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Param2.NewWidth" or "Param2.Resize"
If you will assign OnCanResizeHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnChangeHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Edit1.OnChange:= ekWSHControl1.OnChangeHandler": MyCanvas.OnChanging handling will be routed to "Edit1_OnChange()" if such procedure exists in the script)
If you will assign OnChangeHandler to another kind of events then unhandled "Access violation" exception mayl be raised due to stack crash
procedure OnChangingHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "MyCanvas.OnChanging:= ekWSHControl1.OnChangingHandler": MyCanvas.OnChanging handling will be routed to "MyCanvas_OnChanging()" if such procedure exists in the script)
If you will assign OnChangingHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnClickHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Panel1.OnClick:= ekWSHControl1.OnClickHandler": Panel1.OnClick handling will be routed to "Panel1_OnClick()" if such procedure exists in the script)
If you will assign OnClickHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnCloseHandler(Sender: TObject; var Action: TCloseAction);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Form1.OnClose:= ekWSHControl1.OnCloseHandler": Form1.OnClose handling will be routed to "Form1_OnClose()" if such procedure exists in the script)
Action parameter of Forms.TCloseEvent is incapsulated in TCloseEventArgs class. OnCloseHandler procedure creates TCloseEventArgs instance, fills it with passed value and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Param2.Action".
This router works only for TCloseEvent or similar events wich require similar parameters
If you will assign OnCloseHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnCloseQueryHandler(Sender: TObject; var CanClose: Boolean);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Form1.OnCloseQuery:= ekWSHControl1.OnCloseQueryHandler": Form1.OnCloseQuery handling will be routed to "Form1_OnCloseQuery()" if such procedure exists in the script)
CanClose parameter of TCloseQueryEvent is incapsulated in TCloseQueryEventArgs class. OnCloseQueryHandler procedure creates TCloseQueryEventArgs instance, fills it with passed value and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Params.CanClose".
If you will assign OnCloseQueryHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnConstrainedResizeHandler(Sender: TObject; var MinWidth: integer; var MinHeight: integer; var MaxWidth: integer; var MaxHeight: integer);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnConstrainedResize:= ekWSHControl1.OnConstrainedResizeHandler": Panel1.OnConstrainedResize handling will be routed to "Panel1_OnConstrainedResize()" if such procedure exists in the script)
MinWidth, MinHeight, MaxWidth and MaxHeight parameters of TConstrainedResizeEvent are incapsulated in TConstrainedResizeEventArgs class. OnConstrainedResizeHandler procedure creates TConstrainedResizeEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Param2.MinWidth" or "Param2.MaxHeight"
If you will assign OnConstrainedResizeHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnContextPopupHandler(Sender: TObject; MousePos: TPoint; var Handled: boolean);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnContextPopup:= ekWSHControl1.OnContextPopupHandler": Panel1.OnContextPopup handling will be routed to "Panel1_OnContextPopup()" if such procedure exists in the script)
MousePos and Handled parameters of TContextPopupEvent are incapsulated in TContextPopupEventArgs class. OnContextPopupHandler procedure creates TContextPopupEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Params.Handled", "Params.MousePos_X" and "Params.MousePos_Y".
If you will assign OnContextPopupHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnCreateHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Form1.OnCreate:= ekWSHControl1.OnCreateHandler": Form1.OnCreate handling will be routed to "Form1_OnCreate()" if such procedure exists in the script)
If you will assign OnCreateHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnDblClickHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Panel1.OnDblClick:= ekWSHControl1.OnDblClickHandler": Panel1.OnDblClick handling will be routed to "Panel1_OnDblClick()" if such procedure exists in the script)
If you will assign OnDblClickHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnDeactivateHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Form1.OnDeactivate:= ekWSHControl1.OnDeactivateHandler": Form1.OnDeactivate handling will be routed to "Form1_OnDeactivate()" if such procedure exists in the script)
If you will assign OnDeactivateHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnDestroyHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Form1.OnDestroy:= ekWSHControl1.OnDestroyHandler": Form1.OnDestroy handling will be routed to "Form1_OnDestroy()" if such procedure exists in the script)
If you will assign OnDestroyHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnEnterHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Edit1.OnEnter:= ekWSHControl1.OnEnterHandler": Edit1.OnEnter handling will be routed to "Edit1_OnEnter()" if such procedure exists in the script)
If you will assign OnEnterHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnExecuteHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Action1.OnExecute:= ekWSHControl1.OnExecuteHandler": Action1.OnExecute handling will be routed to "Action1_OnExecute()" if such procedure exists in the script)
If you will assign OnExecuteHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnExitHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Edit1.OnExit:= ekWSHControl1.OnExitHandler": Edit1.OnExit handling will be routed to "Edit1_OnExit()" if such procedure exists in the script)
If you will assign OnExitHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnHideHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Form1.OnHide:= ekWSHControl1.OnHideHandler": Form1.OnHide handling will be routed to "Form1_OnHide()" if such procedure exists in the script)
If you will assign OnHideHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnKeyDownHandler(Sender: TObject; var Key: Word; Shift: TShiftState);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnKeyDown:= ekWSHControl1.OnKeyDownHandler": Panel1.OnKeyDown handling will be routed to "Panel1_OnKeyDown()" if such procedure exists in the script)
Key and Shift parameters of TKeyEvent are incapsulated in TKeyEventArgs class. OnKeyDownHandler procedure creates TKeyEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Params.Key" or "Params.Shift"
This router works only for TKeyEvent or similar events which require similar parameters
If you will assign OnKeyDownHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnKeyPressHandler(Sender: TObject; var Key: char);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnKeyPress:= ekWSHControl1.OnKeyPressHandler": Panel1.OnKeyPress handling will be routed to "Panel1_OnKeyPress()" if such procedure exists in the script)
Key parameter of TKeyPressEvent is incapsulated in TKeyPressEventArgs class. OnKeyPressHandler procedure creates TKeyPressEventArgs instance, fills it with passed value and passes it as second parameter (the first is Sender) to script procedure, so parameter can be accesses within script handler as properties of this object, i.e. "Params.Key".
If you will assign OnKeyPressHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnKeyUpHandler(Sender: TObject; var Key: Word; Shift: TShiftState);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnKeyUp:= ekWSHControl1.OnKeyUpHandler": Panel1.OnKeyUp handling will be routed to "Panel1_OnKeyUp()" if such procedure exists in the script)
Key and Shift parameters of TKeyEvent are incapsulated in TKeyEventArgs class. OnKeyUpHandler procedure creates TKeyEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Params.Key" or "Params.Shift"
This router works only for TKeyEvent or similar events which require similar parameters
If you will assign OnKeyUpHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnMouseDownHandler(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X: integer; Y: integer);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnMouseDown:= ekWSHControl1.OnMouseDownHandler": Panel1.OnMouseDown handling will be routed to "Panel1_OnMouseDown()" if such procedure exists in the script)
Button, Shift, X and Y parameters of TMouseEvent are incapsulated in TMouseEventArgs class. OnMouseDownHandler procedure creates TMouseEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Params.X" or "Params.Shift"
This router works only for TMouseEvent or similar events which require similar parameters
If you will assign OnMouseDownHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnMouseMoveHandler(Sender: TObject; Shift: TShiftState; X: integer; Y: integer);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnMouseMove:= ekWSHControl1.OnMouseMoveHandler": Panel1.OnMouseMove handling will be routed to "Panel1_OnMouseMove()" if such procedure exists in the script)
Shift, X and Y parameters of TMouseMoveEvent are incapsulated in TMouseMoveEventArgs class. OnMouseMoveHandler procedure creates TMouseMoveEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Params.X" or "Params.Shift"
This router works only for TMouseMoveEvent or similar events which require similar parameters
If you will assign OnMouseMoveHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnMouseUpHandler(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X: integer; Y: integer);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnMouseUp:= ekWSHControl1.OnMouseUpHandler": Panel1.OnMouseUp handling will be routed to "Panel1_OnMouseUp()" if such procedure exists in the script)
Button, Shift, X and Y parameters of TMouseEvent are incapsulated in TMouseEventArgs class. OnMouseUpHandler procedure creates TMouseEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Params.X" or "Params.Shift"
This router works only for TMouseEvent or similar events which require similar parameters
If you will assign OnMouseUpHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnMouseWheelDownHandler(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnMouseWheelDown:= ekWSHControl1.OnMouseWheelDownHandler": Panel1.OnMouseWheelDown handling will be routed to "Panel1_OnMouseWheelDown()" if such procedure exists in the script)
Shift, MousePos and Handled parameters of TMouseWheelUpDownEvent are incapsulated in TMouseWheelUpDownEventArgs class. OnMouseWheelDownHandler procedure creates TMouseWheelUpDownEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Param2.Handled", "Param2.MousePos_X" or "Param2.Shift".
This router works only for TMouseWheelUpDownEvent or similar events which require similar parameters.
If you will assign OnMouseWheelDownHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnMouseWheelHandler(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnMouseWheel:= ekWSHControl1.OnMouseWheelHandler": Panel1.OnMouseWheel handling will be routed to "Panel1_OnMouseWheel()" if such procedure exists in the script)
Shift, WheelDelta, MousePos and Handled parameters of TMouseWheelEvent are incapsulated in TMouseWheelEventArgs class. OnMouseWheelHandler procedure creates TMouseWheelEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Params.Handled", "Params.MousePos_X" or "Params.Shift".
This router works only for TMouseWheelEvent or similar events which require similar parameters.
If you will assign OnMouseWheelHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnMouseWheelUpHandler(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
For controls which exist in application irrespective of the script, handlers from script must be set obviously.
(i.e. "Panel1.OnMouseWheelUp:= ekWSHControl1.OnMouseWheelUpHandler": Panel1.OnMouseWheelUp handling will be routed to "Panel1_OnMouseWheelUp()" if such procedure exists in the script)
Shift, MousePos and Handled parameters of TMouseWheelUpDownEvent are incapsulated in TMouseWheelUpDownEventArgs class. OnMouseWheelUpHandler procedure creates TMouseWheelUpDownEventArgs instance, fills it with passed values and passes it as second parameter (the first is Sender) to script procedure, so parameters can be accesses within script handler as properties of this object, i.e. "Params.Handled", "Params.MousePos_X" or "Params.Shift".
This router works only for TMouseWheelUpDownEvent or similar events which require similar parameters.
If you will assign OnMouseWheelUpHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnPaintHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Form1.OnPaint:= ekWSHControl1.OnPaintHandler": Form1.OnPaint handling will be routed to "Form1_OnPaint()" if such procedure exists in the script)
If you will assign OnPaintHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnResizeHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Panel1.OnResize:= ekWSHControl1.OnResizeHandler": Panel1.OnResize handling will be routed to "Panel1_OnResize()" if such procedure exists in the script)
If you will assign OnResizeHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnShowHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Form1.OnShow:= ekWSHControl1.OnShowHandler": Form1.OnShow handling will be routed to "Form1_OnShow()" if such procedure exists in the script)
If you will assign OnShowHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure OnTimerHandler(Sender: TObject);
For controls which exist in application irrespective of the script, handlers from script must be set obviously
(i.e. "Timer1.OnTimer:= ekWSHControl1.OnTimerHandler": Timer1.OnTimer handling will be routed to "Timer1_OnTimer()" if such procedure exists in the script)
If you will assign OnTimerHandler to another kind of events then unhandled "Access violation" exception may be raised due to stack crash
procedure ProxyDestroyed(Address: Pointer);
procedure RegisterClass(const Name: String; AClass: TPersistent);
After registering, all published members of object become visible and operatable from script
procedure Reset; override;
function RunProc(const Name: string; ThrowExceptionIfNotFound: Boolean = True): OleVariant; overload; function RunProc(const Name: string; argArray: array of OleVariant; ThrowExceptionIfNotFound: Boolean): OleVariant; overload;
procedure SetHandler(Control: TPersistent; Name: string);
property OnAddControlFromScript: TAddControlEvent;
Ekas Software Windows Script Host Control for Delphi Help
|
Copyright (c)2002,2003 Ekas Software
|