agmonyy 0 Posted October 9, 2004 Hello everyone,Where's the error here? I needed to use a for loop to create a msgbox... This test works...$test = "testing" $test = $test & @CRLF & InputBox("test", "enter test string") MsgBox(0, "The Result is", $test)So Why doesn't this?$msgtext = "You have Chosen to Upload " & $filenumber & " Files." & @CRLF for $i = 1 to $Filenumber $msgtext = $msgtext & "File " $i & " - K:\" & $name[$i] & " = " & round((filegetsize($name[$i])/1048576), 1) & " MB." & @CRLF Next MsgBox(0, "Confirm The Files You Have Chosen", $msgtext)Error in expression points to $msgtext =. does anyone know why?Thanks,agmonyy Share this post Link to post Share on other sites
ezzetabi 3 Posted October 9, 2004 (edited) Try:$msgtext = "You have Chosen to Upload " & $filenumber & " Files." & @CRLF For $i = 1 To $filenumber $msgtext = $msgtext & "File " & $i & " - K:\" & $name[$i] & " = " & round( (FileGetSize($name[$i]) / 1048576), 1) & " MB." & @CRLF Next MsgBox(0, "Confirm The Files You Have Chosen", $msgtext)And overall be careful about...$msgtext = $msgtext & "File " & $i & " - K:\" & 'ECT...'...the concatenations symbols. Edited October 9, 2004 by ezzetabi Share this post Link to post Share on other sites
agmonyy 0 Posted October 9, 2004 Try:$msgtext = "You have Chosen to Upload " & $filenumber & " Files." & @CRLF For $i = 1 To $filenumber $msgtext = $msgtext & "File " & $i & " - K:\" & $name[$i] & " = " & round( (FileGetSize($name[$i]) / 1048576), 1) & " MB." & @CRLF Next MsgBox(0, "Confirm The Files You Have Chosen", $msgtext)And overall be careful about...$msgtext = $msgtext & "File " & $i & " - K:\" & 'ECT...'...the concatenations symbols.<{POST_SNAPBACK}>That works.Thanks again Like I said, I'm a new AutoIt user, so I'm still learning!Agmonyy Share this post Link to post Share on other sites