ScriptCrafter Posted December 21, 2009 Posted December 21, 2009 (edited) Hello, I am trying to do the following: Take values in two defined array $array1[8] $array2[255] Where $array1[0] = 0 $array1[1] = 32 $array1[2] = 64 $array1[3] = 96 $array1[4] = 128 $array1[5] = 160 $array1[6] = 192 $array1[7] = 224 And $array2[255] = 1 through 255 And loop those values to do the following: FileWrite ($FILE, 0.0) FileWrite ($FILE, 0.32) FileWrite ($FILE, 0.64) until its done with $array1 and does FileWrite ($File, 1.0) FileWrite ($File, 1.32) FileWrite ($File, 1.64) So on and so forth all the way through 255 for $array2 Any help is very much appreciated Also if there was a way to concantante those values and store to one array that would be the cats meow :-) Thank You! Edited December 21, 2009 by ScriptCrafter
99ojo Posted December 21, 2009 Posted December 21, 2009 (edited) Hi, Dim $array1[8], $array2[256] ;$array1[0] = 0 ;$array1[1] = 32 ;$array1[2] = 64 ;$array1[3] = 96 ;$array1[4] = 128 ;$array1[5] = 160 ;$array1[6] = 192 ;$array1[7] = 224 $count = 0 For $i = 0 To 224 Step 32 $array1 [$count] = $i $count += 1 Next For $i = 0 To 255 $array2 [$i] = $i Next $FILE = FileOpen ("c:\testlog.txt", 1) For $i = 0 To UBound ($array2) - 1 For $j = 0 To UBound ($array1) - 1 FileWriteLine ($FILE, $array2 [$i] & "." & $array1 [$j]) Next Next FileClose ($FILE) ShellExecute ("notepad", "c:\testlog.txt") ;-)) Stefan Edit: Add automatic creation of arrays. Edited December 21, 2009 by 99ojo
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