I have an application that uses TEmbeddedWb to automate data scrapping tasks.
Some web-sites show messages / popup boxes when my app navigates to it, and these makes the process slower.
I want to block any messagebox that TWebbrowser could show.
I'm already setting the 'silent' property to true, and also setting the onshowmessage method as follow, but still the messageboxes are show. Any hints ?
function TForm1.webShowMessage(Sender: TObject; HWND: Cardinal; lpstrText,
lpstrCaption: PWideChar; dwType: Integer; lpstrHelpFile: PWideChar; dwHelpContext: Integer;
var plResult: Integer): HRESULT;
begin
plresult := S_OK;
end;
I could achieve these task by making some changes on TEmbeddedWb source, specifically on the functionbelow :
Here is the change :