#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <File.au3>
$size = FileGetSize (@ScriptFullPath)
Global $url="http://union1.sogou.com/validateCode"
Global $gif = @TempDir&'\sogougou'&$size&'.jpg'
FileInstall("jz.jpg",@TempDir&"\jz.jpg")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("test", 304, 249, 192, 114)
$Pic1 = GUICtrlCreatePic(@TempDir&"\jz.jpg", 64, 50, 108, 36,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label3 = GUICtrlCreateLabel("验证码:", 20, 64, 43, 17)
$Edit1=GUICtrlCreateEdit("", 16, 112, 265, 121)
$Button1 = GUICtrlCreateButton("注册", 216, 16, 59, 25)
$input3=GUICtrlCreateInput("", 184, 64, 89, 21,$ES_NUMBER)
GUISetState(@SW_SHOW)
Sleep(500)
GUICtrlSetData($Edit1,"程序启动成功!"&@CRLF,1)
#EndRegion ### END Koda GUI section ###
Button1Click()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
xxx()
EndSwitch
WEnd
Func xxx()
Dim $oHttp = ObjCreate("winhttp.winhttprequest.5.1")
$cc=GUICtrlRead($input3)
$oHttp.Open("Post", "http://union1.sogou.com", False)
$oHttp.setRequestHeader("Accept","image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/x-ms-xbap, application/x-ms-application, application/QVOD, application/QVOD, */*")
$oHttp.setRequestHeader("Referer", "http://union.sogou.com")
$oHttp.setRequestHeader("Accept-Language", "zh-cn")
$oHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$oHttp.setRequestHeader("Accept-Encoding", "gzip, deflate")
$oHttp.setRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET4.0C; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)")
$oHttp.setRequestHeader("Host", "union1.sogou.com")
$oHTTP.setRequestHeader("Content-Length", "51")
$oHTTP.setRequestHeader("Connection", "Keep-Alive")
$oHttp.setRequestHeader("Cache-Control", "no-cache")
$oHttp.setRequestHeader("Cookie", "JSESSIONID=abcndT0qTYJIv6Sc0or1s")
$oHTTP.send("username=xal&password=35345&activecode="&$cc)
_FileWriteLog("log.txt",$oHTTP.responseText)
;MsgBox(0,0,$b)
;ShellExecute("http://union1.sogou.com/index.action")
EndFunc
Func Button1Click()
download()
GUICtrlSetImage ($Pic1,$gif)
EndFunc
Func download()
InetGet ($url,$gif, 1, 0)
EndFunc
大侠们帮忙看看呀~~