|
本帖最后由 lion.lee 于 2010-7-31 00:12 编辑
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("密码配置文件生成", 297, 203, -1, -1)
$EnterPassLabel = GUICtrlCreateLabel("请输入Lotus密码:", 16, 36, 102, 17, 0)
$EnterPassLabe2 = GUICtrlCreateLabel("请输入W3密码:", 17, 77, 93, 17, 0)
$EnterPassLabe3 = GUICtrlCreateLabel("请输入域密码:", 17, 122, 88, 17, 0)
$lotus = GUICtrlRead(GUICtrlCreateInput("password", 120, 32, 153, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD)))
$w3 = GUICtrlRead(GUICtrlCreateInput("password", 121, 77, 153, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD)))
$china = GUICtrlRead(GUICtrlCreateInput("password", 121, 117, 153, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD)))
#cs
现象:
1、使用$lotus = GUICtrlRead(GUICtrlCreateInput。。。。时不管输入什么都返回的都是默认值;
2、使用$lotus = GUICtrlCreateInput。。。。时不管输入什么都返回的都是6;
#ce
$ButtonOk = GUICtrlCreateButton("确定(&O)", 30, 160, 75, 25, $BS_NOTIFY)
$ButtonCancel = GUICtrlCreateButton("取消(&C)", 183, 160, 75, 25, $BS_NOTIFY)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ButtonOk
IniWrite(@ScriptDir & "\Password.ini", "config", "lotus", $lotus)
IniWrite(@ScriptDir & "\Password.ini", "config", "w3", $w3)
IniWrite(@ScriptDir & "\Password.ini", "config", "china", $china)
FileSetAttrib(@ScriptDir & "\Password.ini", "+H")
Send("!{f4}")
Sleep(1000)
MsgBox(64, "通知", "配置文件已经自动生成,请确认!", 1)
ShellExecute(@ScriptDir & "\Password.ini")
Sleep(3000)
Send("!{f4}")
Case $ButtonCancel
Exit
EndSwitch
WEnd |
|