daslick Posted December 26, 2006 Share Posted December 26, 2006 My array is $proxylist.... it has a range of [1] to [20] I am trying to get a random one sent to a variable. This is the line that I have, but does not work. $testvar = '$proxylist' & "[" & random(1,20,1) & "]" I hate arrays. They can die. Link to comment Share on other sites More sharing options...
xcal Posted December 26, 2006 Share Posted December 26, 2006 $proxylist[random(1,20,1)] How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
daslick Posted December 26, 2006 Author Share Posted December 26, 2006 Thanks..... It worked... here's what I'm using it for $proxylist = _ArrayCreate("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20") GUICtrlSetData($proxyinput,$proxylist[random(0,19,1)]) Link to comment Share on other sites More sharing options...
xcal Posted December 26, 2006 Share Posted December 26, 2006 No need to _arraycreate. You can just do... Dim $proxylist[20] = ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"] How To Ask Questions The Smart Way 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