|
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
#Region ### START Koda GUI section ### Form=
$Form3 = GUICreate("未完成", 250, 99, 309, 248)
GUICtrlCreateLabel("请输入密码:", 8, 12, 77, 17)
$Input1 = GUICtrlCreateInput("", 8, 32, 233, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("确定(&O)", 86, 64, 75, 25)
$Button2 = GUICtrlCreateButton("取消", 167, 64, 75, 25)
GUICtrlSetLimit($Input1, 100)
Dim $AccelKeys[2][2]=[["{Enter}", $Input1], ["{Enter}", $Button1]]
GUISetAccelerators($AccelKeys)
GUISetState(@SW_SHOW)
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $Msg = $Input1
Button1()
Case $msg = $Button1
Case $msg = $Button2
ExitLoop
EndSelect
WEnd
Exit
Func Button1()
If GUICtrlRead($Input1) = "123" Then
$Form1 = GUICreate("Form1", 191, 51, 192, 124)
$in1 = GUICtrlCreateButton("控制面板", 32, 0, 97, 41, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Case $in1
Run("control.exe")
Exit
EndSwitch
WEnd
Else
Msgbox(0,"标题","密码错误",3)
Exit
EndIf
EndFunc |
|