hazed Posted May 21, 2007 Share Posted May 21, 2007 I have to pull spec information off Dell's Support page. So far I have the script being able to input the query of Tag number and get the information that I need on the screen. This is done by Javascripts. What I need is to put the information into a Spreadsheet. What I am missing is how to read the screen: I could select all, Copy and Paste into notepad, search for what I want and populate a file. Seems like there has to be a better way! ~Hazed Link to comment Share on other sites More sharing options...
GMK Posted May 21, 2007 Share Posted May 21, 2007 Look at the IE.au3 UDF. _IETableGetCollection() and _IETableWriteToArray() should help you with what you need. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted May 21, 2007 Moderators Share Posted May 21, 2007 Would it be something similar to this?Dell Support Automation Link to comment Share on other sites More sharing options...
hazed Posted May 21, 2007 Author Share Posted May 21, 2007 Look at the IE.au3 UDF. _IETableGetCollection() and _IETableWriteToArray() should help you with what you need. Thank you, that helped alot....I'm just not there yet! I found that it has 23 tables and that the table I need is table 14: I used _Arraydisplay to find it. Now as a newbie I need to access write this data to a CVS file..(or excel). how can I just write to file: row[0,1],row[1,1],row[3,1] when I try: #include <IE.au3> #include <Array.au3> $oIE = _IEcreate ("http://support.dell.com/support/topics/global.aspx/support/my_systems_info/en/details?c=us&l=en&s=gen&~tab=2&~ck=ln&lnki=0") $oTable = _IETableGetCollection ($oIE) $iNumTables = @extended MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page") $i = 14 $otable = _IETableGetCollection ($oIE, $i) $aTableData = _IETableWriteToArray ($oTable) _ArrayDisplay($aTabledata, "_ArrayDisplay() 2D Test", 1, 1) MsgBox(0, "table Info", $i &" "& $aTableData) In msg box I get nothing as I aspected: but if I use $atabledata[0,1] i get subscript error. I'm not seeing how to use it just yet. ~hazed Link to comment Share on other sites More sharing options...
Kogmedia Posted May 21, 2007 Share Posted May 21, 2007 (edited) Thank you, that helped alot....I'm just not there yet! I found that it has 23 tables and that the table I need is table 14: I used _Arraydisplay to find it. Now as a newbie I need to access write this data to a CVS file..(or excel). how can I just write to file: row[0,1],row[1,1],row[3,1] when I try: #include <IE.au3> #include <Array.au3> $oIE = _IEcreate ("http://support.dell.com/support/topics/global.aspx/support/my_systems_info/en/details?c=us&l=en&s=gen&~tab=2&~ck=ln&lnki=0") $oTable = _IETableGetCollection ($oIE) $iNumTables = @extended MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page") $i = 14 $otable = _IETableGetCollection ($oIE, $i) $aTableData = _IETableWriteToArray ($oTable) _ArrayDisplay($aTabledata, "_ArrayDisplay() 2D Test", 1, 1) MsgBox(0, "table Info", $i &" "& $aTableData) In msg box I get nothing as I aspected: but if I use $atabledata[0,1] i get subscript error. I'm not seeing how to use it just yet. ~hazed Have a play with the help template, I had this last nite when I was learning the feature #include <IE.au3> $oIE = _IE_Example ("table") $oTable = _IETableGetCollection ($oIE, 0) $aTableData = _IETableWriteToArray ($oTable) For $x = 0 to Ubound($aTableData,2)-1 For $y = 0 To UBound($aTableData)-1 MsgBox(0,"",$aTableData[$y][$x]) Next Next Edited May 21, 2007 by Kogmedia [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search Link to comment Share on other sites More sharing options...
GMK Posted May 22, 2007 Share Posted May 22, 2007 (edited) IE Table --> Array --> CSV #include <IE.au3> $oIE = _IE_Example ("table") $oTable = _IETableGetCollection ($oIE, 0) $aTableData = _IETableWriteToArray ($oTable) $sCSV = "" For $i = 0 To UBound($aTableData, 2) - 1 For $j = 0 To UBound($aTableData, 1) - 1 $sCSV &= $aTableData[$j][$i] If $j < UBound($aTableData, 2) - 1 Then $sCSV &= ", " Next $sCSV &= @CR Next MsgBox(0, "CSV", $sCSV) _IEQuit($oIE) Edited May 22, 2007 by GMK 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