agmonyy Posted October 7, 2004 Share Posted October 7, 2004 Hello all,I am a new AutoIt user and I wrote a script to auto-upload files to a website. The script works perfectly, except for one thing:if $filenumber >= 1 then $name[$i] = InputBox("File Upload", "Enter Name for file - root folder is 'K:\'", "test.avi", "")I can't figure out how to put a $i in the input box...Everything I tried I get this:Enter Name for file $i - root folder is 'K:\'What am I doing wrong?Thanks,Agmonyy Link to comment Share on other sites More sharing options...
ezzetabi Posted October 7, 2004 Share Posted October 7, 2004 Try: if $filenumber >= 1 then $name[$i] = InputBox("File Upload", "Enter Name for file " & $i & " root folder is 'K:\'", "test.avi", "") Everything inside the " (or the ') is seens as pure text. So you need to close them and concatenate ( & ) the value of the Variant you need. E.g. $eg = ' the end' MsgBox(0,'','And so this was' & $eg) Will show a msgbox with 'And so this was the end'. Instead: $eg = ' the end' MsgBox(0,'','And so this was $eg') Will show 'And so this was $eg' that it may be not what you want. Link to comment Share on other sites More sharing options...
agmonyy Posted October 7, 2004 Author Share Posted October 7, 2004 Try:if $filenumber >= 1 then $name[$i] = InputBox("File Upload", "Enter Name for file " & $i & " root folder is 'K:\'", "test.avi", "")Everything inside the " (or the ') is seens as pure text. So you need to close them and concatenate ( & ) the value of the Variant you need.E.g.$eg = ' the end' MsgBox(0,'','And so this was' & $eg)Will show a msgbox with 'And so this was the end'.Instead:$eg = ' the end' MsgBox(0,'','And so this was $eg')Will show 'And so this was $eg' that it may be not what you want.<{POST_SNAPBACK}>That solved my problem. Thanks! 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