fjnetbar 发表于 2010-5-21 16:29:53

创建一个from1的密码窗口,输入密码后按确定键自动进入第二个窗口

创建一个from1的密码窗口,输入密码后按确定键自动关闭from1窗口,而后进入from2窗口界面,按取消则关闭窗口。#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("密码窗口", 251, 100, -1, -1)
;加载皮肤
Dim $Dll
FileInstall("SkinCrafterDll.dll", @ScriptDir& "\SkinCrafterDll.dll",1)
FileInstall("B-style.skf", @ScriptDir& "\V-touch.skf",1)
$Dll = DllOpen(@ScriptDir& "\SkinCrafterDll.dll")
DllCall($Dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1")
DllCall($Dll, "int:cdecl", "InitDecoration", "int", 1)
DllCall($Dll, "int:cdecl", "LoadSkinFromFile", "wstr", @ScriptDir& "\V-touch.skf")
DllCall($Dll, "int:cdecl", "DecorateAs", "int", $Form1, "int", 25)
DllCall($Dll, "int:cdecl", "ApplySkin")
#Region ### START Koda GUI section ### Form=
$PasswordEdit = GUICtrlCreateInput("password", 8, 32, 233, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
$ButtonOk = GUICtrlCreateButton("确定(&O)", 86, 64, 75, 25, $BS_NOTIFY)
$ButtonCancel = GUICtrlCreateButton("取消(&C)", 167, 64, 75, 25, $BS_NOTIFY)
$EnterPassLabel = GUICtrlCreateLabel("请输入密码:", 8, 12, 76, 17, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
;退出加载皮肤
Func Quit()
    GUISetState(@SW_HIDE)
    DllCall($dll, "int", "DeInitDecoration")
    DllCall($dll, "int", "RemoveSkin")
    DllClose($dll)
    FileDelete ( @TempDir&"\SkinCrafterDll.dll" )
    FileDelete ( @TempDir&"\vista_style.skf" )
    Exit
EndFunc

tianya1631 发表于 2010-5-21 17:04:34

$kcps = "123"
Do
        $input=InputBox("安全认证!", "安全口令:", "", "*",200,120)
        If @errorThen Exit
        If $kcps <> $input Then MsgBox(0,"错误!","您输入的口令有误,请重新输入")
       
       
Until $kcps = $input Or @error = 1

lanfengc 发表于 2010-5-21 17:51:39

http://autoitx.com/forum.php?mod=viewthread&tid=12960&extra=&page=1到这里看吧, 我就不重复的发上来浪费论坛空间了。
页: [1]
查看完整版本: 创建一个from1的密码窗口,输入密码后按确定键自动进入第二个窗口