Jump to content

For 1 to 10


 Share

Recommended Posts

Dim $password[10]
$password[1] = "1"
$password[2] = "2"

$passwordwindow = GUICreate("",180,100)
GUICtrlCreateGroup("Password", 10, 10, 160, 55)
$passwordtext = GUICtrlCreateInput("",20,30,140,20,$es_password)
$passwordenter = GUICtrlCreateButton("Ok",10,70,75,20,$BS_DEFPUSHBUTTON)
$passwordexit = GUICtrlCreateButton("Cancel",95,70,75,20)
GuiSetState()

While 1
   $msg = GUIGetMsg()
   Select
     Case $msg = $GUI_EVENT_CLOSE Or $msg = $passwordexit
         GUIDelete()
         Exit
     Case $msg = $passwordenter
             If GUICtrlRead($passwordtext) = $password[Number] Then
                 Exitloop
             Else
                 MsgBox(8240,"Wrong password","Wrong password. Please try again...",0)
             EndIf
EndSelect

WEndoÝ÷ ÙhZ¶l©®åzh¬-¢Æ²jëh×6If GUICtrlRead($passwordtext) = $password[A number]

I have tryed with for $i 1 to 10 step 1, but I couldn't get it to work :ph34r:.

A loop, it was that it was called :lmao:.

Thank You :geek:

Link to comment
Share on other sites

Dim $password[10]
$password[1] = "1"
$password[2] = "2"

$passwordwindow = GUICreate("",180,100)
GUICtrlCreateGroup("Password", 10, 10, 160, 55)
$passwordtext = GUICtrlCreateInput("",20,30,140,20,$es_password)
$passwordenter = GUICtrlCreateButton("Ok",10,70,75,20,$BS_DEFPUSHBUTTON)
$passwordexit = GUICtrlCreateButton("Cancel",95,70,75,20)
GuiSetState()

While 1
   $msg = GUIGetMsg()
   Select
     Case $msg = $GUI_EVENT_CLOSE Or $msg = $passwordexit
         GUIDelete()
         Exit
     Case $msg = $passwordenter
             If GUICtrlRead($passwordtext) = $password[Number] Then
                 Exitloop
             Else
                 MsgBox(8240,"Wrong password","Wrong password. Please try again...",0)
             EndIf
EndSelect

WEndoÝ÷ ÙhZ¶l©®åzh¬-¢Æ²jëh×6If GUICtrlRead($passwordtext) = $password[A number]oÝ÷ ØZ½ëkÉçpØ_¢½7ê-],µêunëHr¥v}ý¶­ÛhÂäè@)ܲØZ¶+pjÇW¬¶W©äb¿ªê-xX«²ÐâMú¥«,ÂÝ×G^rV«zƧuªëk,"¶¥zg§¶Çë¢m7ꬳ
+wKa®í7ꬳ
+wÔrݶ¬y§è®Z(¥«­¢+Ù½ÈÀÌØí¤ôÀQ¼ä(%U%
ÑɱI ÀÌØíÁÍÍݽÉÑáФôÀÌØíÁÍÍݽÉlÀÌØí¥tQ¡¸(ìe½ÕȽ¹¥Ñ¥½¹°½¡É(¹%)9áÐ

:lmao:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Maybe...

#include <GUIConstants.au3>


Dim $passwords = StringSplit("dave,john,sue,anyone", ",")
Dim $passok = 0

$passwordwindow = GUICreate("", 180, 100)
GUICtrlCreateGroup("Password", 10, 10, 160, 55)
$passwordtext = GUICtrlCreateInput("", 20, 30, 140, 20, $es_password)
$passwordenter = GUICtrlCreateButton("Ok", 10, 70, 75, 20, $BS_DEFPUSHBUTTON)
$passwordexit = GUICtrlCreateButton("Cancel", 95, 70, 75, 20)
GUISetState()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE Or $msg = $passwordexit
            GUIDelete()
            Exit
        Case $msg = $passwordenter
            $passcheck = GUICtrlRead($passwordtext)
            For $x = 1 To $passwords[0]
                If $passcheck = $passwords[$x] Then $passok = 1
            Next
            If $passok Then ExitLoop    
            MsgBox(8240, "Wrong password", "Wrong password. Please try again...", 0)
            
    EndSelect
    
WEnd

8)

NEWHeader1.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...