moocher Posted November 2, 2006 Share Posted November 2, 2006 I've got an array with two dimensions, and i want all the data from [x][0] to be in one long string I've tried this and it doesnt work Dim $typer[10][4] $normalskema = 0 $overarbejde = 5 $hjemsyg = 7 $typer[$normalskema][0] = "Normal planlagt" $typer[$normalskema][1] = 16 $typer[$normalskema][2] = 0 $typer[$overarbejde][0] = "Overarbejde" $typer[$overarbejde][1] = 15 $typer[$overarbejde][2] = 3 $typer[$hjemsyg][0] = "Gået syg hjem" $typer[$hjemsyg][1] = 17 $typer[$hjemsyg][2] = 7 For $type in $typer $typemenu = $typemenu & $type[0] & "|" MsgBox(0,0,$typemenu) Next Link to comment Share on other sites More sharing options...
jvanegmond Posted November 2, 2006 Share Posted November 2, 2006 (edited) For . In is only used with objects. This is how you should have done it: Dim $Array[5][2] $Array[0][0] = "Valuator" $Array[1][0] = "Smoke_N" $Array[2][0] = "Helge" $Array[3][0] = "Paulie" $Array[4][0] = "nfwu" Dim $Text For $x = 0 to Ubound($Array,1)-1 $Text &= $Array[$x][0] & @CRLF Next MsgBox(0, "$Text", $Text) Edit: added "-1" after Ubound (Thanks herewasplato) Edited November 2, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
herewasplato Posted November 2, 2006 Share Posted November 2, 2006 tryFor $x = 0 To (UBound($Array, 1) - 1) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Helge Posted November 2, 2006 Share Posted November 2, 2006 moocher...setter du meg opp som "hjemsyg" i morgen ? snøft, host, hark... Link to comment Share on other sites More sharing options...
jvanegmond Posted November 2, 2006 Share Posted November 2, 2006 snøft, host, hark...en een lepel. github.com/jvanegmond Link to comment Share on other sites More sharing options...
moocher Posted November 2, 2006 Author Share Posted November 2, 2006 I used that in the beginning but if you look here http://www.autoitscript.com/autoit3/docs/k...s/ForInNext.htmThey showed it was also for arrays 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