Hoth2001 Posted September 6, 2017 Posted September 6, 2017 Much of the examples I research seem to show how to loop through an array all at one time. I'm trying to loop through elements in an array and call their values at different points in my code. And I'm stuck...... Here's the code I started out with: ; INTEND TO SEND INFO FROM ARRAY [1][0] MouseClick('primary', 585,210, 1, 0) Sleep(300) Send( ) Sleep(300) ;INTEND TO SEND INFO FROM ARRAY [1][1] MouseClick('primary', 585,210, 1, 0) Sleep(300) Send( ) Sleep(300) ; INTEND TO SEND INFO FROM ARRAY [2][0] MouseClick('primary', 585,210, 1, 0) Sleep(300) Send( ) Sleep(300) ;INTEND TO SEND INFO FROM ARRAY [2][1] MouseClick('primary', 585,210, 1, 0) Sleep(300) Send( ) Sleep(300) and so on...and so forth.....to the end of the array Using a for $element In $aArray still doesn't seem to enable me to call the values when I need them at different lines in the code. Help needed!! Thanks!!
Floops Posted September 7, 2017 Posted September 7, 2017 Looks like you need to use nested loops. Try the following: For $i = 1 To UBound($array) - 1 For $j = 0 To UBound($array, 2) - 1 MouseClick('primary', 585, 210, 1, 0) Sleep(300) Send($array[$i][$j]) Sleep(300) Next Next
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