实际参数不够?

Oma*_*bal 0 delphi automation iwebbrowser2

以下程序返回error : e2035 not enough actual parameters2个位置(第39和45行)并且未编译.有人可以帮帮我吗?我可以在这里输入0或null代替参数吗?

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,ComObj,shdocvw,activex, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
  var
   mybrowser : iwebbrowser2;
  myUserName,
myPassword,loginURL : string;
    Flags: OleVariant;

begin
    Flags :=  navOpenInNewWindow;
     MyBrowser := CreateOleObject('InternetExplorer.Application') as IWebBrowser2;
MyBrowser.Navigate('http://www.gmail.com',flags,'_blank');

myUserName := 'UserName';
myPassword := 'password';
loginURL:='javascript:var Email = document.getElementById(''Email'');Email.value=''' + myUserName + ''';var Password = document.getElementById(''Passwd'');Password.value=''' + myPassword + ''';var SignIn = document.getElementById(''signIn'');SignIn.click();';

MyBrowser.Navigate(loginURL);

end;

end.
Run Code Online (Sandbox Code Playgroud)

Ser*_*yuz 5

您可以在variants.pas上使用任何虚拟变量或"EmptyParam"变量;

MyBrowser.Navigate(loginURL,0,EmptyParam,EmptyParam,EmptyParam);
Run Code Online (Sandbox Code Playgroud)