Glyph Posted October 15, 2006 Share Posted October 15, 2006 Like this... $count = a Do MsgBox(0, "AutoIt Example", "Count is: " & $count) $count = $count + 1 letter Until $count > zzz MsgBox(0, "Done", "Finished!") Is there anyway to have it go through a-z, aa-zz, aaa-zzz etc.? tolle indicium Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 15, 2006 Share Posted October 15, 2006 Hi, for what? You can try with ASC() So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted October 15, 2006 Share Posted October 15, 2006 #Include <String.au3> Global $letter[3] $letter[1] = "a" $letter[2] = "z" For $i = 1 to 10 MsgBox(0,"Test",_StringRepeat($letter[1],$i) & "-" & _StringRepeat($letter[2],$i)) Next Link to comment Share on other sites More sharing options...
theguy0000 Posted October 15, 2006 Share Posted October 15, 2006 $count = 97 Do MsgBox(0, "AutoIt Example", "Count is: " & $count &@CRLF& "letter is: " & Chr($count)) $count = $count + 1 Until $count > 122 MsgBox(0, "Done", "Finished!") not tested The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Cue Posted October 15, 2006 Share Posted October 15, 2006 th.meger is right use ASCII codes For $a=97 to 122 MsgBox(0, "AutoIt Example", "Count is: " &Chr($a)) Next but i have not given you the method for multiple characters since i am slightly suspicous as to what you want this for. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted October 15, 2006 Share Posted October 15, 2006 (edited) #Include <String.au3> Global $t = 1 While 1 For $i = 97 to 122 MsgBox(0,"Test",_StringRepeat(Chr($i),$t)) Next $t+=1 WEnd i believe this is for bruteforce use but i coudl care less Edited October 15, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 15, 2006 Share Posted October 15, 2006 HI, I guess brutfoeceing can be done better or also with permutation. code by Smoke_N expandcollapse popup$permutarray = permute("abcdef") $msg = "" For $n = 1 To $permutarray[0] $msg = $msg & $permutarray[$n] & @CRLF Next ConsoleWrite($msg) Func rotate($sString, $nRotateLevel) Local $aStringArray = StringSplit($sString,"") Local $nStartRotate = $aStringArray[0] - $nRotateLevel + 1 Local $n, $tempchar, $tempstr = "", $retval = "" For $n = 1 To $nStartRotate - 1 $tempstr= $tempstr & $aStringArray[$n] Next $tempchar = $aStringArray[$nStartRotate] For $n = $nStartRotate+1 To $aStringArray[0] $retval = $retval & $aStringArray[$n] Next $retval = $tempstr & $retval & $tempchar Return $retval EndFunc ;==>rotate Func permute_internal($sString, $nRotateLevel, ByRef $permutations) Local $n, $str Dim $arr[$nRotateLevel] If $nRotateLevel = 2 Then $permutations = $permutations & ":" & rotate($sString,$nRotateLevel) Return EndIf $str = $sString For $n = 0 To $nRotateLevel -1 $str = rotate($str,$nRotateLevel) $arr[$n] = $str ;--- special check, to stop a level beeing printed twice --- If not (($n = 0) AND (StringLen($sString) > $nRotateLevel)) Then $permutations = $permutations & ":" & $arr[$n] EndIf permute_internal($arr[$n],$nRotateLevel-1,$permutations) Next EndFunc ;==>permute_internal Func permute($sString) Global $permutations = "" permute_internal($sString,StringLen($sString),$permutations) $permutations = StringTrimLeft($permutations,1) Return StringSplit($permutations,":") EndFunc ;==>permute So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
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