User Script Manager to write and manage your scripts.
A simple script example:
// UserMain // This script contains special functions related to some of the events triggered by the application. //You can then optionally add new commands. function OnBeforeNavigate(NewURL, TargetFrame: String): Boolean; begin //Before the application displays a page. Set Result to True to stop the operation. Result := False; end; procedure OnNavigateComplete; begin // When a page has been displayed. end;
A script file is a group of procedures or functions. Each script file has a unique name; each procedure/function has a name following these rules:
only alphanumeric characters may be used, no space.
each name must be unique in a given script file, but you can have two different script files that contain procedures or functions with the same name.