#include <IE.au3>
Func _Post_Login($Name,$Pass)
$oHTTP = ObjCreate("Msxml2.xmlhttp")
$oHTTP.Open("Post","http://www.autoitx.com/logging.php?action=login",false)
$oHTTP.setRequestHeader("Cache-Control", "no-cache")
$oHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
$oHTTP.setRequestHeader("Referer","http://www.autoitx.com")
$oHTTP.Send('sid=dJ6jji&formhash=aa9fb561&referer=&cookietime=2592000&loginfield=username&username=' & $Name & '&password=' & $Pass & '&questionid=0&answer=&loginsubmit=%BB%E1%D4%B1%B5%C7%C2%BC')
$Log = BinaryToString($oHTTP.responseBody)
$Log = _Search($Log,'<p>(.*?)<script>')
MsgBox(64,"提示:",$Log)
EndFunc
Func _Search($Txt,$Condition)
Local $Result
$array = StringRegExp($Txt,$Condition, 2, 1)
for $i = 0 to UBound($array) - 1
$Result = $array[$i]
Next
Return $Result
EndFunc
$Name= "用户名"
$Pass= "密码"
_Post_Login($Name,$Pass)
_IECreate ("http://www.autoitx.com/",1,1,0)