Jump to content
Sign in to follow this  
Rishav

Creating an Arrary from a variable [OPEN]

Recommended Posts

Rishav

Hi folks

a very elementary question

I have a variable

$daycat=101

Now I want to read the variable value into a single dimension array like

$ARRAY[1]=1

$ARRAY[2]=0

$ARRAY[3]=1

do we have any command similar to

$ARRAY=writeintoarray($daycat)

in autoit?

thanks and regards

Rishav

Share this post


Link to post
Share on other sites
Skizmata

#include <array.au3>
$daycat = 101

$array = StringSplit($daycat,"")
_ArrayDisplay($array)

Like that only the [0] is set to the number of elements in the array.


AutoIt changed my life.

Share this post


Link to post
Share on other sites
Rishav

Thanks Skiz. I am gonna give it a whirl right now.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.