Sign in to follow this  
Followers 0
yyzMarkg

Array / Index problem

8 posts in this topic

Hello; I'm having a little difficulty with the concept of Arrays and specifically getting a value from an index intersection. So far I have this code (note...'writeToArray' with False was just recently changed from True. I was just seeing the result).

#include <IE.au3>
#include <Array.au3>
Local $aTableData[13]
$oIE = _IEAttach ("AR Collection")
$oTable = _IETableGetCollection ($oIE, 6)
$aTableData = _IETableWriteToArray ($oTable, False)
_ArrayDisplay($aTableData)

It correctly displays two rows by 13 columns. I will always have [0] index containing my header row information up to 13 columns (Client Name, Client Number, ... , Credit Limit)

[1] index will be the unique customer data relating to the header row.

My Goal: How do I create a MsgBox example and Write to File example that will show various intersection points of the index...such as ONLY column 3, 5, and 11 of the [1] index (first row of customer data after the header index [0])? I do not want to see the header row index[0].

Thanks!

Mark

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

I'm not terribly sure this is what you are asking, but if you want to get at column 3 of row 1, array subscripts are probably what you're asking about

$aTableData[1][3]

Edit: jaberwocky6669 beat me to it as I was typing :idea:

Edited by Fulano

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Share this post


Link to post
Share on other sites

I have never used it before, but it looks like _ArraySort might be what your looking for.

Rush Fan?

Thanks, Billo; I can see what _ArraySort is doing. But my main problem still is how do I do "something" with a specific index location? For example:

[0] Client Name (col 1), Client Number (col 2), Credit Limit (col 3)

[1] MarkG (col 1), 123456 (col 2), $10,000 (col 3).

How would I do a msgbox to show [1][3] ? So my result would display $10,000?

p.s. not that big of a Rush Fan (but I know YYZ is one of their songs) I'm in logistics and YYZ is Toronto's Airport Code. Cheers!

Share this post


Link to post
Share on other sites

I'm not terribly sure this is what you are asking, but if you want to get at column 3 of row 1, array subscripts are probably what you're asking about

$aTableData[1][3]

Edit: jaberwocky6669 beat me to it as I was typing :idea:

Hi Fulano; Yes, that is where I'm heading. I'm a little confused where I need to place $aTableData[1][3] and how to call it up in a msgbox. Sorry, I know it's probably so simple, but I'm at a complete roadblock here and have been staring at code for so long my brain hurts!

Share this post


Link to post
Share on other sites

Hi Fulano; Yes, that is where I'm heading. I'm a little confused where I need to place $aTableData[1][3] and how to call it up in a msgbox. Sorry, I know it's probably so simple, but I'm at a complete roadblock here and have been staring at code for so long my brain hurts!

Oh my god! Embarrassing...I just figured it out in the Msgbox. I was trying to identify it up in the Local, or ArrayDisplay. So simple. Thanks again Fulano :idea:

Share this post


Link to post
Share on other sites

Yeah that's were they got it from originally...

looks like your on the right track, I use arrays with excel mostly so if you wanted to write the array to an excel table and then read a specific cell that would be easier to help with for a newb such as myself...

Good Luck!

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