Brogsitter Posted February 14, 2009 Share Posted February 14, 2009 I havent found a solution for this issue so far, but I really wonder if this is possible somehow. $counter = 0 $var_1 = "something" $var_2 = "something else" While 1 = 1 $counter = $counter + 1 MsgBox(1, ""var_" & $counter", ""var_" &counter" WEnd Any ideas or help will be appreciated. Link to comment Share on other sites More sharing options...
monoceres Posted February 14, 2009 Share Posted February 14, 2009 Take a look at the Assign() function Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Paulie Posted February 14, 2009 Share Posted February 14, 2009 (edited) You can very likely do what you want to do using Arrays. Dim $strings[5] $Strings[0] = "Message 1" $Strings[1] = "Message 2" $Strings[2] = "Message 3" $Strings[3] = "Message 4" $Strings[4] = "Message 5" For $i = 0 to 5 Msgbox(0,$Strings[$i], $Strings[$i]) Next Edited February 14, 2009 by Paulie Link to comment Share on other sites More sharing options...
Brogsitter Posted February 14, 2009 Author Share Posted February 14, 2009 Thanks for the ideas. I will have a look at the stuff straight away. Link to comment Share on other sites More sharing options...
corgano Posted February 15, 2009 Share Posted February 15, 2009 I havent found a solution for this issue so far, but I really wonder if this is possible somehow. $counter = 0 $var_1 = "something" $var_2 = "something else" While 1 = 1 $counter = $counter + 1 MsgBox(1, ""var_" & $counter", ""var_" &counter" WEnd Any ideas or help will be appreciated. have you tried swimming? $counter = 0 $var_1 = "something" $var_2 = "something else" While 1 = 1 $counter = $counter + 1 MsgBox(1, $var_1 & " is " & $counter, var_2 & " is " & $counter) WEnd like this: $value & "text" 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Paulie Posted February 15, 2009 Share Posted February 15, 2009 have you tried swimming? $counter = 0 $var_1 = "something" $var_2 = "something else" While 1 = 1 $counter = $counter + 1 MsgBox(1, $var_1 & " is " & $counter, var_2 & " is " & $counter) WEnd like this: $value & "text"Not what he was asking. He wanted to reference Var1 and Var2 with a counter Link to comment Share on other sites More sharing options...
CodyBarrett Posted February 15, 2009 Share Posted February 15, 2009 OR you could try useing timerinit() and timerdiff() maybe thats not what you want but you could try [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Malkey Posted February 15, 2009 Share Posted February 15, 2009 (edited) I havent found a solution for this issue so far, but I really wonder if this is possible somehow. $counter = 0 $var_1 = "something" $var_2 = "something else" While 1 = 1 $counter = $counter + 1 MsgBox(1, ""var_" & $counter", ""var_" &counter" WEnd Any ideas or help will be appreciated.This appears to work. Local $counter = 0 Local $var_0 Local $var_1 = "something" Local $var_2 = "something else" Assign("var_" & $counter, Eval("var_" & $counter + 2) & " Extra") While $counter <> 3 MsgBox(1, "var_" & $counter, "var_" & $counter & " = " & Eval("var_" & $counter)) $counter = $counter + 1 WEnd Edit: Added Assign() Function which was mentioned in an earlier post. It adds to the possibilities of variables manipulation. Edited February 15, 2009 by Malkey Link to comment Share on other sites More sharing options...
CodyBarrett Posted February 15, 2009 Share Posted February 15, 2009 ok if your looking for a time func what i said would work lol what ever you need [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] 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