Jump to content

Recommended Posts

Local $arr[4]
$arr[1]=["ayz", 123, 11]
$arr[2]=["byz", 123, 22]
$arr[3]=["cyz", 123, 33]

for $var in $arr
;    some_func("ayz", 123, 11) 
     some_func($var.split[1], $var.split[2], $var.split[3])
next

i think this example explains the loop im trying to accomplish.... how can i set array split into 3 values

Link to comment
Share on other sites

here is a better example of what im trying to do...

#include 
#include 
Local $text[5]
$text[1] = "xyz##20##0"
$text[2] = "abc##20##0"
$text[3] = "asd##20##0"
$text[4] = "sad##20##0"

for $var In $text
Local $array1 = _StringExplode($var, "##", 0)
MsgBox(1,"", $array1[0])
MsgBox(1,"", $array1[1])
MsgBox(1,"", $array1[2])
; some_func($array1[0], $array1[1], $array1[2])



Next
Link to comment
Share on other sites

onedayillpay,

Is this what you are trying to do?

#include <string.au3>
#include <array.au3>
Local $text[5]
$text[1] = "xyz##20##0"
$text[2] = "abc##20##0"
$text[3] = "asd##20##0"
$text[4] = "sad##20##0"

local $array1

for $1 = 1 to ubound($text) - 1
    $array1 = _StringExplode($text[$1], "##", 0)
    for $2 = 0 to ubound($array1) - 1
        my_goofy_function($array1[$2])
    next
Next

func my_goofy_function($str)

    ConsoleWrite('This is my goofy value ' & $str & @LF)

endfunc

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...