哪位帮我把下面的两个连起来,我的目的是先运行输入密码窗口,输入正确的密码后运行下一个窗口,先谢了!!
输入密码:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
$Form1 = GUICreate("输入密码", 299, 110, -1, -1)
$Label1 = GUICtrlCreateLabel("请在下面输入正确的密码:", 24, 24, 148, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlCreateInput("", 24, 64, 137, 21,$ES_PASSWORD)
$Button1 = GUICtrlCreateButton("确 定", 200, 20, 73, 24, 0)
$Button2 = GUICtrlCreateButton("取 消", 200, 64, 73, 24, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$pass=GUICtrlRead(4)
Select
Case $pass=""
msgbox(016,"错误","密码不能为空,请重新输入.")
Case $pass<>"123"
msgbox(016,"错误","密码不正确,请重新输入.")
Case $pass="123"
;运行第二个窗口
EndSelect
Case $Button2
Exit
EndSwitch
WEnd
第二个窗口:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 323, 141, -1, -1)
$Button1 = GUICtrlCreateButton("打开C盘", 56, 56, 81, 33, 0)
$Button2 = GUICtrlCreateButton("打开D盘", 184, 56, 81, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
ShellExecute("C:\")
Case $Button2
ShellExecute("D:\")
EndSwitch
WEnd
[ 本帖最后由 手缺一指 于 2008-12-7 18:38 编辑 ] |