#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Administrator\桌面\Form1.kxf
$Form1 = GUICreate("南昌星空极速自动拨号助手", 480, 161, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")
$Input0=GUICtrlCreateInput("", 80, 16, 337, 21)
GUICtrlSetOnEvent(-1, "Input0Change")
$Input1=GUICtrlCreateInput("", 80, 48, 337, 21)
GUICtrlSetOnEvent(-1, "Input1Change")
$Input2=GUICtrlCreateInput("", 80, 80, 337, 21)
GUICtrlSetOnEvent(-1, "Input2Change")
$Button1 = GUICtrlCreateButton("保存配置并设置为开机自动拨号", 120, 112, 225, 33)
GUICtrlSetOnEvent(-1, "Button1Click")
GUICtrlCreateLabel("程序目录:", 16, 16, 64, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlCreateLabel("宽带账号:", 15, 50, 64, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlCreateLabel("宽带密码:", 15, 83, 64, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("浏览", 424, 16, 41, 25)
GUICtrlSetOnEvent(-1, "Button2Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
If FileExists("fy.ini") Then
$file = IniRead("fy.ini","设置","程序路径","配置文件fy.ini未找到!")
If FileExists($file) Then
Else
Msgbox(0, 0, "无法根据配置文件中的路径找到文件,路径设置错误,请检查配置文件中的程序路径设置。")
EndIf
Else
EndIf
Func Button1Click()
If $Input0="" Then
Msgbox(1, "请设置路径:", "星空极速程序路径为空,请设置!")
ElseIf
$Input1="" Then
MsgBox(1,"错误","宽带账户不能为空!")
ElseIf
$Input2="" Then
MsgBox(1,"错误","宽带密码不能为空!")
Else
IniWrite("fy.ini","设置","程序路径",$Input0)
IniWrite("fy.ini","设置","宽带账户",$Input1)
IniWrite("fy.ini","设置","宽带密码",$Input2)
EndIf
EndFunc
Func Button2Click()
$mulu=FileOpenDialog("选择星空极速主程序","","可执行文件(NetKeeper.exe)",1+8)
GUICtrlSetData($Input0,$mulu)
EndFunc
运行后弹出 提示框:无法根据配置文件中的路径找到文件,路径设置错误,请检查配置文件中的程序路径设置。然后就自动关闭。怎么不会向下执行。新手初学,望各位大大给予指正,多谢!