Advertisement
automacoestutoriais

AutoHotkey - Login Secreto

May 25th, 2021 (edited)
1,073
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Gui, Add, Edit, x70 y49 w100 vUser
  2. Gui, Add, Edit, x70 y99 w100 vPassword Password
  3. Gui, Add, Text, x22 y49, Usuário:
  4. Gui, Add, Text, x22 y99, Senha:
  5. Gui, Add, Button, x72 y159 w100 h30 Default gLogin, Entrar
  6. Gui, Show, w258 h222, LOGIN
  7. return
  8.  
  9. Login:
  10. Gui, Submit, NoHide
  11. if (user && password)
  12. {
  13.     pass1 := A_Hour + A_DD
  14.     pass2 := A_Min + A_MM
  15.     senha = %pass1%%pass2%
  16.     if (user = "admin" && password = senha)
  17.     {
  18.         MsgBox, 64, Sucesso, Seja bem-vindo!
  19.         ExitApp
  20.     }
  21.     else
  22.     {
  23.         MsgBox, 16, Aviso, Senha ou usuário incorreto!
  24.         GuiControl,, User
  25.         GuiControl,, Password
  26.         GuiControl, Focus, User
  27.     }
  28. }
  29. else
  30. {
  31.     MsgBox, 48, Aviso, Preencha todos os campos!
  32. }
  33. return
  34.  
  35. GuiClose:
  36. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement