|
Opt("TrayIconHide", 1)
Opt("TrayAutoPause",0)
$Dir = @ScriptDir & "\QQNetBar.ini"
$na=IniRead(@ScriptDir & "\QQNetBar.ini" , "账号","na","")
$ps=IniRead(@ScriptDir & "\QQNetBar.ini" , "密码","ps",'')
$run=@ScriptDir & "\QQNetBar.exe"
If FileExists($run) = 0 Then
MsgBox(4096, "错误", "找不到QQ网吧网关执行程序,请放到QQ网吧网关的安装目录", 10)
Exit
EndIf
If FileExists($Dir) = 0 Then
IniWrite($Dir, "账号", "na", "")
IniWrite($Dir, "密码", "ps", "")
Exit
EndIf
if $na = "" then
MsgBox(4096, "错误", "请输入账号!", 10)
GUISetIcon("008.ico")
$Form2 = GUICreate("资料对话框", 267, 176, -1, -1)
$1 = GUICtrlCreateInput("", 8, 32, 233, 21, BitAND($ES_PASSWORD,$ES_AUTOHSCROLL))
$2 = GUICtrlCreateInput("", 8, 103, 233, 21, BitAND($ES_PASSWORD,$ES_AUTOHSCROLL))
$3 = GUICtrlCreateLabel("请输入账号:", 8, 12, 76, 17)
$4 = GUICtrlCreateLabel("请输入密码:", 8, 70, 76, 17)
$Ok = GUICtrlCreateButton("确定(&O)", 86, 136, 75, 25, 0)
$exit = GUICtrlCreateButton("取消(&C)", 175, 136, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Ok
$w=GUICtrlRead($1)
IniWrite(@ScriptDir & "\QQNetBar.ini" , "账号","na",$w)
$w1=GUICtrlRead($2)
IniWrite(@ScriptDir & "\QQNetBar.ini" , "密码","ps",$w1)
Exit
Case $exit
Exit
EndSwitch
WEnd
Exit
EndIf
if $ps = "" then
MsgBox(4096, "错误", "请输入密码!", 10)
GUISetIcon("008.ico")
$Form2 = GUICreate("资料对话框", 267, 176, -1, -1)
$1 = GUICtrlCreateInput("", 8, 32, 233, 21, BitAND($ES_PASSWORD,$ES_AUTOHSCROLL))
$2 = GUICtrlCreateInput("", 8, 103, 233, 21, BitAND($ES_PASSWORD,$ES_AUTOHSCROLL))
$3 = GUICtrlCreateLabel("请输入账号:", 8, 12, 76, 17)
$4 = GUICtrlCreateLabel("请输入密码:", 8, 70, 76, 17)
$Ok = GUICtrlCreateButton("确定(&O)", 86, 136, 75, 25, 0)
$exit = GUICtrlCreateButton("取消(&C)", 175, 136, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Ok
$w=GUICtrlRead($1)
IniWrite(@ScriptDir & "\QQNetBar.ini" , "账号","na",$w)
$w1=GUICtrlRead($2)
IniWrite(@ScriptDir & "\QQNetBar.ini" , "密码","ps",$w1)
Exit
Case $exit
Exit
EndSwitch
WEnd
Exit
EndIf
run($run)
WinWaitActive("QQ网吧网关登录")
If WinActive("QQ网吧网关登录") Then
BlockInput(1)
Send($na)
Send("{TAB}")
Send($ps)
Send("{ENTER}")
WinWait ( "QQ网吧网关", "QQNetbarToolbar" )
WinSetState ( "QQ网吧网关", "QQNetbarToolbar",@SW_MINIMIZE )
BlockInput(0)
EndIf
Exit
帮我看一下是哪里问题出错 |
|