Sign in to follow this  
Followers 0
Kyler Carlson

Create an array

3 posts in this topic

Hey guys. I want to make $x_move into an array and the array number be a variable too. how exactly do i do this? I think i've seen it but i can't remember where and can't seem to get it to work. basically i want $x_move[$number] but i think i have to declare it or something... i'm not sure. thanks for help.

Share this post


Link to post
Share on other sites



Hey guys. I want to make $x_move into an array and the array number be a variable too. how exactly do i do this? I think i've seen it but i can't remember where and can't seem to get it to work. basically i want $x_move[$number] but i think i have to declare it or something... i'm not sure. thanks for help.

Like this?

$Num = 12
Dim $x_move[$Num]
For $x = 0 to 11
     $x_move[$x] = $x * 2
Next

That fragment results in a 1D array with 12 indexes, numbered 0 thru 11, and they contain even numbers from 0 thru 22. It's hard to tell from your question if that was really what you wanted though... :)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Hey guys. I want to make $x_move into an array and the array number be a variable too. how exactly do i do this? I think i've seen it but i can't remember where and can't seem to get it to work. basically i want $x_move[$number] but i think i have to declare it or something... i'm not sure. thanks for help.

I'm not sure if this is what you want but wouldn't this work?

$x = $var[1] ; makes $x an array

$y = $x ;that makes the $var[1] = $y

Piano_Man


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0