PcExpert Posted February 9, 2009 Share Posted February 9, 2009 (edited) Hi all, I was wondering how to combine a string and a variable. I currently have this piece of code: $vakeditr = IniRead("vakken.ini", "algemeen", "vakken", "error") $vakeditr2 = StringSplit($vakeditr, ",") For For $i = 1 To $vakeditr2[0] If $vakeditr2[$i] <> "" Then $vakken2 = "$vak" & $i Guictrlsetdata($vakken2, $vakeditr2[$i]) EndIf Next This code should set the data from the stringsplit array in the inputcontrols. However, I cant find a way to combine '$vak' with '$i' so a new variable would be '$vak2' , '$vak3' and so on. Each inputcontrol is defined by '$vak' followed by a number from 1 to 30. Does anyone know how to do this? Thanks! P.S. I looked at the Assign() Function, but that didnt seem to do what I wanted;) Edited February 9, 2009 by PcExpert Link to comment Share on other sites More sharing options...
A. Percy Posted February 9, 2009 Share Posted February 9, 2009 (edited) Eval( "vak" & $i ) Post edited Edited February 9, 2009 by A. Percy Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator VW Bug user Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
PcExpert Posted February 9, 2009 Author Share Posted February 9, 2009 Thanks A. Percy! 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