-
Notifications
You must be signed in to change notification settings - Fork 0
/
Giao dien dang nhap.au3
48 lines (45 loc) · 1.75 KB
/
Giao dien dang nhap.au3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#cs ----------------------------------------------------------------------------
Learn It with PHAMDUCDAT
AUTOIT 2022
Author: Venus
Script Function:
Template AutoIt script.
#ce -----------------------------------------------------------------------
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1_1 = GUICreate("Memberlogin", 533, 263, -1, -1)
Global $Segoe = GUICtrlCreateLabel("Segoe", 2654, 72, 60, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
Global $Label1 = GUICtrlCreateLabel("Username", 32, 32, 91, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
Global $input1 = GUICtrlCreateInput("", 136, 32, 353, 21)
Global $Label2 = GUICtrlCreateLabel("Password", 32, 80, 86, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
Global $input2 = GUICtrlCreateInput("", 136, 80, 353, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
Global $Login = GUICtrlCreateButton("Login", 136, 128, 355, 33, $BS_DEFPUSHBUTTON)
GUICtrlSetCursor(-1,0)
Global $Button1 = GUICtrlCreateButton("Exit", 136, 176, 355, 25)
GUICtrlSetCursor(-1,0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Login
Local $username = GUICtrlRead($input1)
Local $password = GUICtrlRead($input2)
If $username == 'Admin' And $password == '111111' Then
MsgBox(64 + 262144,'Thông báo', 'Bạn đã đăng nhập thành công')
Else
MsgBox(16 + 262144,'Thông báo', 'Tên người dùng hoặc mật khẩu không chính xác')
EndIf
Case $Button1
Exit
EndSwitch
WEnd