SONICX Posted December 13, 2015 Posted December 13, 2015 Hey guys.I tried to make an simple-login program in AutoIT. But i have a small problem. Because I don't know how can I make 3 login attempts. If the user reach this, this program is Exit..Any idea?Thanks!:)#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <TrayConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 295, 108, 251, 166) $Button1 = GUICtrlCreateButton("Login", 16, 72, 91, 25) $Button2 = GUICtrlCreateButton("Exit", 168, 72, 91, 25) $Label1 = GUICtrlCreateLabel("Password:", 8, 24, 54, 17) $Input1 = GUICtrlCreateInput("", 72, 24, 201, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $szamlalo = 3; While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button2 Exit Case $Button1 $jelszo = GUICtrlRead($Input1) If $jelszo = "asd" Then MsgBox(0,"","Logged in!") ElseIf $jelszo == GUICtrlRead($Input1) Then ; how can i subtraction from $szamlalo value? TrayTip("Error!", "Incorrect data. Attempts: " & $szamlalo, 0,$TIP_ICONHAND) EndIf EndSwitch WEnd
Danyfirex Posted December 13, 2015 Posted December 13, 2015 $szamlalo-=1Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now