allSystemsGo Posted October 10, 2013 Share Posted October 10, 2013 I have two arrays. In one array (which I will call $mainArray) has a piece of information which I need to see if another array (which I will call $dataArray) has in common. If they do, I need a piece out of the $dataArray to go in to the $mainArray. I would like the piece that I pull from $dataArray to be put in to the same row that it relates to in the $mainArray. The $mainArray gets turned into a txt file and should be readable like a report (not sloppy.) I have the data pulling, but I am stumped as how to get it to line up. I can provide a sample of the code if it helps. However, I cannot provide the information that it pulls. I hope what I am asking makes sense. Here is my loop where the data gets pulled into the array $count = 0 Do For $i = $count to UBound ($aArray) -1 If $aArray[$i][1] = '' Then sleep(10) else $client =$aArray[$i][1] Msgbox(64,'',$client) ; so I can see whats happening. For $i=0 to UBound($aWyse) - 1 If $aWyse[$i][0] = $client Then $aArray[$i][2]=" "&$aWyse[$i][9] ; I am pretty sure I need to get $i for $aWyse to match up to where the match was found in $aArray. But how? Next Endif Next $count = $count + 1 Until $count = UBound ($aArray) Link to comment Share on other sites More sharing options...
JohnOne Posted October 10, 2013 Share Posted October 10, 2013 I think you should provide runnable code, create some test arrays and demonstrate your issue. I'm willing to bet you will discover your answer while you're doing that. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
allSystemsGo Posted October 10, 2013 Author Share Posted October 10, 2013 Change the variable $i for the second for...next loop to something else. Got it. Link to comment Share on other sites More sharing options...
JohnOne Posted October 10, 2013 Share Posted October 10, 2013 Ace. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
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