回复 1# yiruirui
拿去自己改吧,没有技术含量#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("登录新浪微博", 617, 516, 192, 124)
$Obj = _IECreateEmbedded()
$Obj_ctrl = GUICtrlCreateObj($Obj, 0, 0, 614, 476)
$Label1 = GUICtrlCreateLabel("用户名:", 6, 488, 43, 17)
$Input1 = GUICtrlCreateInput("", 50, 486, 121, 21)
$Label2 = GUICtrlCreateLabel("密码:", 178, 488, 31, 17)
$Input2 = GUICtrlCreateInput("", 210, 486, 121, 21)
$Button1 = GUICtrlCreateButton("登录", 346, 484, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_login(GUICtrlRead($Input1),GUICtrlRead($Input2))
EndSwitch
WEnd
Func _login($name,$pass)
$oHTTP = ObjCreate("microsoft.xmlhttp")
$oHTTP.Open("post","http://login.sina.com.cn/sso/login.php?client=ssologin.js(v1.3.9)",false)
$oHTTP.setRequestHeader("Cache-Control", "no-cache")
$oHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.setRequestHeader("Content-Length","298")
$oHTTP.Send("service=miniblog&client=ssologin.js(v1.3.9)&entry=miniblog&encoding=utf-8&gateway=1&savestate=0&from=&useticket=0&username="&$name&"&password="&$pass&"&url=http:\\t.sina.com.cn\ajaxlogin.php?framelogin=1&callback=parent.sinaSSOController.feedBackUrlCallBack&returntype=META")
$a = $oHTTP.responseText
if StringInStr($a,"sina sso crossdomain") then
_IENavigate($Obj, "http://t.sina.com.cn")
Else
MsgBox(0,"","用户名或密码错误!")
EndIf
EndFunc
|