agmonyy Posted October 9, 2004 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
ezzetabi Posted October 9, 2004 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
agmonyy Posted October 9, 2004 Author Posted October 9, 2004 ezzetabi said: 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
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