Coolw Posted April 9, 2008 Posted April 9, 2008 (edited) Ahh the right place Hey, I was wondering if someone could help me with some code. expandcollapse popup#include <Array.au3> #include <File.au3> $var = 0 $var2 = 0 $nom = 0 $nanswer = 1 While $nanswer = 1 $nletters = InputBox("Password Guesser", "How many letters are in the word?") If @error = 1 Then MsgBox(4096, "Error", "You hit quit!") Else ; They clicked OK, but did they type a number? If $nletters <0 or $nletters>10 Then MsgBox(4096, "Error", "It has to be less than 10 numbers!") Else If StringIsInt ($nletters) Then $nanswer = 0 ; Exit the loop Else MsgBox(4096, "Error", "You did not type in a number!") EndIf EndIf EndIf WEnd ; Make an array with previous password he has already used If $nanswer=0 Then Dim $avArray[7] $avArray[0] = "today" $avArray[1] = "real" $avArray[2] = "test" $avArray[3] = "sunny" $avArray[4] = "rainy" $avArray[5] = "practice" $avArray[6] = "warm" EndIf Dim $avArray2[7] ; Test each array to see if it matches the number of letters For $var = 0 To 6 Step 1 $ntletters = StringLen($avArray[$var2]) If $ntletters = $nletters Then _ArrayInsert ($avArray2, $nom, $avArray[$var]) $nom = $nom + 1 EndIf $var2 = $var +1 Next _ArrayDisplay ($avArray2) So I can't figure out how to make $avArray2 to be the exact dim of the number of words pulled from $avArray. Help is appreciated! Edited April 9, 2008 by Coolw My ProgramsMy WIP'sSteam Server Restarter
GaryFrost Posted April 9, 2008 Posted April 9, 2008 Your clicker don't work. *Click* SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Recommended Posts