Skrip Posted July 22, 2013 Share Posted July 22, 2013 Soo this script appears to work sometimes, but other times it returns an array error at line 22. I'm not sure what's going on, anyone want to take a stab at it? expandcollapse popup#include <Array.au3> Dim $kSpace[36] For $i = 0 To 9; Fill numbers 0-9 $kSpace[$i] = $i Next For $i = 10 To 35; Fill Letters A-Z $kSpace[$i] = Chr($i + 55) Next $n = 3 Dim $k[$n] If $n > 0 Then $n = $n - 1 EndIf For $m = 0 To $n For $i = 0 To 5 $k[$m] = $k[$m] & $kSpace[Random(0, 36, 1)] Next Next _ArrayDisplay($k) Error: .au3 (22) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $k[$m] = $k[$m] & $kSpace[Random(0, 36, 1)] $k[$m] = $k[$m] & ^ ERROR [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Danyfirex Posted July 22, 2013 Share Posted July 22, 2013 (edited) Hi. remember autoit array start in index 0. $kSpace[Random(0, 35, 1)] Edit: maybe this can Help too. #include <Array.au3> Dim $kSpace[1000] for $i=0 to UBound($kSpace)-1 $kSpace[$i]=RNDA_Z_0_9() next _ArrayDisplay($kSpace) Func RNDA_Z_0_9() Local $cadena,$char local $string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" local $i=1 for $i= 1 to 5 $char = stringmid($string,Random(1,stringlen($string),1),1) $cadena &= $char next return $cadena EndFunc saludos Edited July 22, 2013 by Danyfirex 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 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