找回密码
 加入
搜索
查看: 2196|回复: 2

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

[复制链接]
发表于 2010-5-21 16:29:53 | 显示全部楼层 |阅读模式
创建一个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 
发表于 2010-5-21 17:04:34 | 显示全部楼层
$kcps = "123" 
Do 
        $input=InputBox("安全认证!", "安全口令:", "", "*",200,120) 
        If @error  Then Exit
        If $kcps <> $input Then MsgBox(0,"错误!","您输入的口令有误,请重新输入")
        
        
Until $kcps = $input Or @error = 1 
发表于 2010-5-21 17:51:39 | 显示全部楼层
http://autoitx.com/forum.php?mod=viewthread&tid=12960&extra=&page=1
到这里看吧, 我就不重复的发上来浪费论坛空间了。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-22 05:31 , Processed in 0.098119 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表