http://member1.taobao.com/member/login.jhtml
这个页面的密码框我试了很多种方法都填不上东西,但我看到别人有用软件自动填写的,不知道要怎么做
这个页面的密码框我试了很多种方法都填不上东西,但我看到别人有用软件自动填写的,不知道要怎么做
解决方案 »
- delphi窗口问题
- 如何不固定行列显示DBGrid单元格颜色
- 我的DELPHI调试COM中间层时一直无法调试得到,不知如何对DELPHI设置,请各位指点。
- DBlookupcombobox的问题
- 语音acm控件的问题-高手进来
- 怎样在程序中打开lAN中有共享密码的文件夹?密码已知.
- 用query执行一个select语句之后,怎样把查询得到的记录的某个字段全部添加到一个memo中去?
- 求救!我怎么把我的DBGrid显示内容到入Excel表格??
- 很简单的一段代码,但是我不会! 很容易的40分!
- 提示Class tbutton not found ??为什么呢?
- 多点触摸软件的开发方法步骤?
- 控制网吧时间程序代码
procedure TForm1.Button1Click(Sender: TObject);
var
Doc:IHTMLDocument2;
Submit:IHTMLElement;
TPL_UserName:IHTMLInputElement;
PasswordObj:IHTMLObjectElement;
V:OleVariant;
begin
WebBrowser1.Navigate('http://member1.taobao.com/member/login.jhtml');
while WebBrowser1.ReadyState<>4 do
Application.ProcessMessages;
//
Doc:=WebBrowser1.Document as IHTMLDocument2;
TPL_UserName:=Doc.all.item('TPL_username',varEmpty) as IHTMLInputElement;
TPL_UserName.value:='淘宝用户名';
//
PasswordObj:=Doc.all.item('Password_Edit',varEmpty) as IHTMLObjectElement;
V:=PasswordObj.object_;
V.TextData:='';//TPL_password,这里是加密后的密码,具体怎么加密,看网页中的ActiveX,如果您还不会,加分,我帮你搞定
Submit:=Doc.all.item('Submit',varEmpty) as IHTMLElement;
Submit.click;
end;
SHDocVw, MSHTML, OleCtrls;procedure Taobao_Login(Browser: TWebBrowser;UserName,Password:string);
var
Doc:IHTMLDocument2;
PasswordObj:IHTMLObjectElement;
V:OleVariant;
begin
Browser.Navigate('http://member1.taobao.com/member/login.jhtml');
while Browser.ReadyState<>4 do
Application.ProcessMessages;
Doc:=Browser.Document as IHTMLDocument2;
(Doc.all.item('TPL_username',varEmpty) as IHTMLInputElement).value:=UserName;
PasswordObj:=Doc.all.item('Password_Edit',varEmpty) as IHTMLObjectElement;
V:=PasswordObj.object_;
v.PasswordMode:=True;
v.SecurityMode:=False;
V.TextData:=Password;
(Doc.all.item('Submit',varEmpty) as IHTMLElement).Click;
end;
我试了你的代码,密码是base64加密的吧,我写上后,测试时总显示缺少密码,是不是密码没有自动添加进去呢
var
PasswordObj:IHTMLObjectElement;
V:OleVariant;
begin
PasswordObj:=(WebBrowser1.Document as IHTMLDocument2).all.item('Password_Edit',varEmpty) as IHTMLObjectElement;
V:=PasswordObj.object_;
ShowMessage(V.TextData);
end;然后把TextData值给6楼的代码,可以登录的
还有个方法就是用截包软件查看发送的HTTP数据,也可以看到TextData的值。这个TextData如何用明文的方式赋值上去,本人还真搞不定,大侠出来分享
['{F657EB90-FBE0-41A1-9E98-45D784929FB5}']
function Get_PasswordMode: WordBool; safecall;
procedure Set_PasswordMode(pVal: WordBool); safecall;
function Get_SecurityMode: WordBool; safecall;
procedure Set_SecurityMode(pVal: WordBool); safecall;
function Get_TextValue: WideString; safecall;
procedure Set_TextValue(const pVal: WideString); safecall;
function Get_MaxLength: LongWord; safecall;
procedure Set_MaxLength(pVal: LongWord); safecall;
function Get_LogMode: WordBool; safecall;
procedure Set_LogMode(pVal: WordBool); safecall;
function Get_TextData: WideString; safecall;
procedure Set_TextData(const pVal: WideString); safecall;
function EchoTest: WordBool; safecall;
function Get_Readonly: WordBool; safecall;
procedure Set_Readonly(pVal: WordBool); safecall;
function Get_MACAddress: WideString; safecall;
function Crypto(bEncrypt: WordBool; nIndex: LongWord; const pInput: WideString): WideString; safecall;
function Get_CryptoMode: Word; safecall;
procedure Set_CryptoMode(pVal: Word); safecall;
function Get_Intension: LongWord; safecall;
function Get_Identity: WideString; safecall;
function Get_UseP: WordBool; safecall;
function Get_PInfo: WideString; safecall;
function ci1: WideString; safecall;
function ci2: WideString; safecall;
function ci3: WideString; safecall;
procedure Set_cm5ts(const pVal: WideString); safecall;
function Get_cm5ts: WideString; safecall;
procedure Set_cm5pk(const pVal: WideString); safecall;
function Get_cm5pk: WideString; safecall;
property PasswordMode: WordBool read Get_PasswordMode write Set_PasswordMode;
property SecurityMode: WordBool read Get_SecurityMode write Set_SecurityMode;
property TextValue: WideString read Get_TextValue write Set_TextValue;
property MaxLength: LongWord read Get_MaxLength write Set_MaxLength;
property LogMode: WordBool read Get_LogMode write Set_LogMode;
property TextData: WideString read Get_TextData write Set_TextData;
property Readonly: WordBool read Get_Readonly write Set_Readonly;
property MACAddress: WideString read Get_MACAddress;
property CryptoMode: Word read Get_CryptoMode write Set_CryptoMode;
property Intension: LongWord read Get_Intension;
property Identity: WideString read Get_Identity;
property UseP: WordBool read Get_UseP;
property PInfo: WideString read Get_PInfo;
property cm5ts: WideString read Get_cm5ts write Set_cm5ts;
property cm5pk: WideString read Get_cm5pk write Set_cm5pk;
end;
如果放不到密码框上,放到用户名框上,再发送个tab键,也是可以移到密码框上的,但是光标怎么控制我不会
加这一句就可以了。我都自己试过可以了。楼主还唧唧歪歪啰啰嗦嗦。真烦。
如果想调用这个接口里的函数如:crypto 、gevaluetext等返回为空为什么?有什么方法解决吗?