|
楼主 |
发表于 2011-1-19 16:12:36
|
显示全部楼层
本帖最后由 papapa314 于 2011-1-19 16:17 编辑
回复 5# smartzbs
现在我发现用guictrlread可以输入完整的用户名,可是直接赋值的话就乱码了呵呵
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 442, 192, 124)
$Input1 = GUICtrlCreateInput("", 152, 168, 193, 21)
$Input2 = GUICtrlCreateInput("", 152, 224, 193, 21,$ES_PASSWORD)
#include <IE.au3>
GUISetState(@SW_SHOW)
$Button1 = GUICtrlCreateButton("Button1", 168, 304, 161, 41)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MsgBox(0,"",GUICtrlRead($Input2))
$sUrl = "https://login.taobao.com/member/login.jhtml?redirect_url="
$oIE = _IECreate($sUrl)
$oForm = _IEFormGetCollection ($oIE, 0)
$oQuery = _IEFormElementGetCollection ($oForm, 0)
_IEFormElementSetValue ($oQuery, GUICtrlRead($Input1))
$oQuery = _IEFormElementGetCollection ($oForm, 1)
_IEFormElementSetValue ($oQuery,GUICtrlRead($Input2) )
_IEFormSubmit($oForm)
EndSwitch
WEnd
不过,我发现程序一旦运行后就死掉了,只能重开才能登陆下一个账号,不知道这个怎么解决? |
|