1

googiespell スクリプトを Delphi Program で WebBrowser で使用するにはどうすればよいですか。スクリプトはスペルチェッカー用です。私のコードは、Webbrowser 内で Java スクリプトを使用するためのものです。

スクリプトを実行するためのコードです。

uses
  MSHTML_TLB, SHDocVw, ShellAPI;

function ExecuteScript(doc: IHTMLDocument2; script: string; language: string): Boolean;
var
  win: IHTMLWindow2;
  Olelanguage: Olevariant;
begin
  if doc <> nil then
  begin
    try
      win := doc.parentWindow;
      if win <> nil then
      begin
        try
          Olelanguage := language;
          win.ExecScript(script, Olelanguage);
        finally
          win := nil;
        end;
      end;
    finally
      doc := nil;
    end;
  end;
end;


Sample usage:

IDoc: IHTMLDocument2;
Webbrowser1.Document.QueryInterface(IHTMLDocument2, iDoc);
ExecuteScript(iDoc, 'document.login.submit()', 'JavaScript'); 

だから私はウェブブラウザでスペルチェッカーのために googiespell スクリプトを使う必要があります。私を助けてください。?

このサイトから googiespell スクリプトをダウンロードできます

4

0 に答える 0