Sign in to follow this  
Followers 0
HaxLi

Array in return

6 posts in this topic

#1 ·  Posted (edited)

$a = "1, 2, 3"
$aA = StringSplit($a, ", ", 1)
$b = $aA[1] & ", " & $aA[2] & ", " & $aA[3]

MsgBox(0, "abc", $b & " <-- this var works" & @CRLF & $aA & "<-- but don't know how to get the same value without $aA[1-3] -.-'")
;maybe there is something like StringSplit but in another way?oÝ÷ Øz0¶´
ëk+ÚçiÉ"ö«jÈ­Á«%G¢Múi¨r¢}ý¶X¤zØ^¶¬Á¬ºÚ"µÍÌÍØH  ÌÍØPVÌWH    [È ][ÝË  ][ÝÈ  [È ÌÍØPVÌH [È ][ÝË  ][ÝÈ  [È ÌÍØPVÌ×

I need to make this array variable like $aA[$i], thats why that $b above is not what I need..

Thank you for help if any

Friendly,

HaxLi

Edited by HaxLi

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

MsgBox (0, "", $aA[1])

??

not sure I fully understand what you want.

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

@Manadar - I'm sure what he posted was just an example of what he is trying to do. If you don't know how to accomplish what he is asking then thats fine, but don't make useless posts like your last one.

@HaxLi - Does this accomplish what you are wanting?

#include <Array.au3>

$sA = "1,2,3"
$aA = StringSplit($sA, ",")
_ArrayDisplay($aA, "$aA")
$sB = _ArrayToString($aA, ",", 1)
MsgBox(0, "", $sB)

Share this post


Link to post
Share on other sites

@Manadar - I'm sure what he posted was just an example of what he is trying to do. If you don't know how to accomplish what he is asking then thats fine, but don't make useless posts like your last one.

This was his question:

How to get Array value back in var as it was like in $a again?

It seems obvious to me that he would just need to use $a, and don't overwrite the previous value. So his question is pretty much pointless, that was what I was stating with 'lmao'.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Does this accomplish what you are wanting?

Thank you for Code and realy nice help big_daddy!~.. that was what I wanted to do with it :]

$sB = _ArrayToString($aA, ", ", 1)

I realy appreciate your help.. and thanks for some more new code you teatched me here ;p

Manadar I know that $a == $a.. that was just an eg.. it's bcoz $a is default value, and I want to read values from some GUI I made and to write them back in ini file, which is created if filenotexist.. so I want to create changeable variable..

Sorry if my question sounded like stupid one ^^;

Best Regards,

HaxLi

Edited by HaxLi

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