Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.26 KB | None | 0 0
  1. #comments-start
  2. Autor: Ex112
  3. Acesse: Expertz Cheats.com.br
  4. #comments-end
  5. #include <ButtonConstants.au3>
  6. #include <EditConstants.au3>
  7. #include <GUIConstantsEx.au3>
  8. #include <StaticConstants.au3>
  9. #include <WindowsConstants.au3>
  10.  
  11. $Form1 = GUICreate("Sistema de Login - Expertz Cheats", 285, 116, 380, 340)
  12. GUISetBkColor(0x648BCB)
  13. $Label1 = GUICtrlCreateLabel("Username:", 16, 16, 91, 24)
  14. GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
  15. GUICtrlSetCursor (-1, 3)
  16. $Label2 = GUICtrlCreateLabel("Password:", 16, 48, 86, 24)
  17. GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
  18. GUICtrlSetCursor (-1, 3)
  19. $Label3 = GUICtrlCreateLabel("", 104, 192, 4, 4)
  20. GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
  21. $Input1 = GUICtrlCreateInput("", 112, 16, 97, 21)
  22. $Input2 = GUICtrlCreateInput("", 112, 48, 97, 21)
  23. $Button1 = GUICtrlCreateButton("Login", 216, 16, 59, 21)
  24. $Button2 = GUICtrlCreateButton("Exit", 216, 48, 59, 21)
  25. $Label4 = GUICtrlCreateLabel("Expertz Cheats.com.br", 32, 80, 216, 28)
  26. GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
  27. GUICtrlSetCursor (-1, 3)
  28. GUISetState(@SW_SHOW)
  29.  
  30. While 1
  31.     $nMsg = GUIGetMsg()
  32.     $vUsername = GuiCtrlRead ($Input1); Lê o que está escrito no Input1 (campo username)
  33.     $vPassword = GuiCtrlRead ($Input2); Lê o que está escrito no Input2 (campo password)
  34.     Switch $nMsg
  35.         Case $GUI_EVENT_CLOSE
  36.             Exit
  37.         Case $Button2; dá função ao Button2 (botão Exit)
  38.             Exit; finaliza o programa
  39.         Case $Button1; dá função ao Button1 (botão Login)
  40.             If Login($vUsername, $vPassword) = "Login" Then; verifica se username e passwords estão de acordo com gravado no programa
  41.                 MsgBox (64, 'Expertz Cheats', 'Logado com Sucesso'); se username e password estiverem corretos exibe msg de login
  42.                 _Principal();chama a form principal ou algum programa externo ou outra coisa, aee vai do qee vc quer
  43.             Else; caso username e password estejam incorretos,
  44.                 MsgBox (16, 'Expertz Cheats', 'Username ou Passwords Incorretos'); exibe a msg de erro
  45.             EndIf
  46.  
  47.     EndSwitch
  48. WEnd
  49.  
  50. Func Login ($Username, $Password)
  51.     If $Username = 'Ex112' And $Password = 'Expertz Cheats' Then; faz a verificação doq foi digitado no input e oqee está gravado
  52.         Return ('Login'); se for igual retorna "Login"
  53.     Else; se ñ for
  54.         Return ('Error'); retorna Error
  55.     EndIf
  56. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement