|
#NoTrayIcon
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
if FileExists("config.dat")=true Then
$title = IniRead("config.dat","配置","程序标题",0)
$qqname = IniRead("config.dat","配置","QQ号码",0)
$qqpassward = IniRead("config.dat","配置","QQ密码",0)
$qqpach = IniRead("config.dat","配置","QQ路径",0)
Else
MsgBox(64,"SYSTEM ERROR","程序检测配置指失败或配置文件丢失。请检查!")
Exit
EndIf
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate($title, 264, 167, 193, 115)
GUISetFont(9, 400, 0, "宋体")
$Button1 = GUICtrlCreateButton("登录QQ(&S)", 80, 72, 115, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Run($qqpach)
WinWait("QQ用户登录","")
WinActive("QQ用户登录","")
ControlFocus("QQ用户登录","","Edit1")
ControlSetText("QQ用户登录","","Edit1","")
Send($qqname)
ControlFocus("QQ用户登录","","Edit12")
ControlSetText("QQ用户登录","","Edit12","")
Send($qqpassward)
ControlClick("QQ用户登录","","Button11")
EndSwitch
WEnd
在以上的脚本中。设置了正确的QQ号和密码。当登录的时候会提示密码错误!
请各位指点一下!
[ 本帖最后由 moonboor 于 2008-11-6 17:34 编辑 ] |
|