11st와 auction의 스트립트를 자동으로 실해하여
로그인 하는 방법입니다.
11st는 잘되는데 옥션은 되지 않습니다.
이방법으로 해결할수 없다면 다른 인디나 다른 콤포넌트로 어떻게 할수 있는지 궁금합니다.
고수님 부탁 드립니다.
<!--CodeS-->
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,
comObj, OleCtrls, SHDocVw;
type
TForm1 = class(TForm)
BT_11_Open: TButton;
BT_11_Loin_navi: TButton;
BT_11_form_value: TButton;
BT_11_Login: TButton;
BT_AU_Navi: TButton;
BT_AU_login_NAVi: TButton;
BT_AU_form_value: TButton;
BT_AU_Loin: TButton;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure BT_11_OpenClick(Sender: TObject);
procedure BT_11_Loin_naviClick(Sender: TObject);
procedure BT_11_form_valueClick(Sender: TObject);
procedure BT_11_LoginClick(Sender: TObject);
procedure BT_AU_NaviClick(Sender: TObject);
procedure BT_AU_login_NAViClick(Sender: TObject);
procedure BT_AU_form_valueClick(Sender: TObject);
procedure BT_AU_LoinClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
procedure OpenBrowser( sURL : string );
{ Public declarations }
end;
var
Form1: TForm1;
IE : Variant;
implementation
procedure TForm1.OpenBrowser( sURL : string );
const
csOLEObjName ='InternetExplorer.Application';
var WinHandle : HWnd;
begin
if (VarIsEmpty(IE) ) then
begin
IE := CreateOleObject( csOLEObjName);
IE.Visible := true;
IE.Navigate( sURL);
end
else
begin
WinHandle := FindWindow( 'IEFrame', nil );
if ( 0 <> WinHandle ) then
begin
IE.Navigate( sURL );
SetForegroundWindow( WinHandle );
end;
end;
end;
///////////////////////////////////
///////////////////////////////////
{$R *.dfm}
procedure TForm1.BT_11_OpenClick(Sender: TObject);
begin
OpenBrowser('http://www.11st.co.kr');
end;
procedure TForm1.BT_11_Loin_naviClick(Sender: TObject);
begin
IE.Navigate('http://www.11st.co.kr/login/Login.tmall?returnURL=/browsing/TStreetMain.tmall?method%3DgetTStreetMain');
end;
procedure TForm1.BT_11_form_valueClick(Sender: TObject);
begin
IE.document.login_form.loginName.value := Edit1.Text;
IE.document.login_form.passWord.value := Edit2.Text;
end;
procedure TForm1.BT_11_LoginClick(Sender: TObject);
begin
IE.document.login_form.submit();
end;
procedure TForm1.BT_AU_NaviClick(Sender: TObject);
begin
IE.Navigate('http://www.auction.co.kr');
end;
procedure TForm1.BT_AU_login_NAViClick(Sender: TObject);
begin
IE.Navigate('http://member.auction.co.kr/Authenticate/?url=http%3A//www.auction.co.kr/');
end;
procedure TForm1.BT_AU_form_valueClick(Sender: TObject);
begin
IE.document.form.id.value := Edit1.Text;
IE.document.form.password.value := Edit2.Text;
end;
procedure TForm1.BT_AU_LoinClick(Sender: TObject);
begin
IE.document.form.submit();
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.Text := '';
Edit2.Text := '';
end;
end.
<!--CodeE-->
procedure TForm1.BT_AU_form_valueClick(Sender: TObject);
begin
IE.document.form.id.value := Edit1.Text;
IE.document.form.password.value := Edit2.Text;
/// 이부분 입력하면 됩니다.
IE.document.form.action := 'https://memberssl.auction.co.kr/Authenticate/login.aspx?WeblogYN=N';
end;
폼태크에 aution이 없고 스크립트내에 있어서 그런것 같습니다.