yyzMarkg Posted April 21, 2010 Share Posted April 21, 2010 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 Link to comment Share on other sites More sharing options...
l3ill Posted April 21, 2010 Share Posted April 21, 2010 (edited) I have never used it before, but it looks like _ArraySort might be what your looking for. Rush Fan? Edited April 21, 2010 by billo My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
Fulano Posted April 21, 2010 Share Posted April 21, 2010 (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 Edited April 21, 2010 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! Link to comment Share on other sites More sharing options...
yyzMarkg Posted April 21, 2010 Author Share Posted April 21, 2010 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! Link to comment Share on other sites More sharing options...
yyzMarkg Posted April 21, 2010 Author Share Posted April 21, 2010 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 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! Link to comment Share on other sites More sharing options...
yyzMarkg Posted April 21, 2010 Author Share Posted April 21, 2010 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 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted April 21, 2010 Share Posted April 21, 2010 Maybe you should take a look at the Array Tutorial in the wiki. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
l3ill Posted April 21, 2010 Share Posted April 21, 2010 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! My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example 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