DaleHohm Posted September 1, 2006 Posted September 1, 2006 If you are going to do a lot of work with IE.au3, please swith over to writing and running your scripts in SciTe (see the download page). IE.au3 writes a lot of warnings and errors to the console that will help you. Either that or you've got to start examining all of the return codes from your function calls (good practice anyway). You need to start adding some basic error checking into your code until you understand it better. Check to see if $aTableData really "isArray", examine the values of $iMax and $jMax to see if they make sense, check the value of @extended after you call _IETableGetCollection to see how many tables really are on the page. Another hint is that you can examine $oTable.innerHTML or $oTable.innerText to see if you have the right one... Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
d0n Posted September 1, 2006 Author Posted September 1, 2006 (edited) I do write it in SciTe And when i put index as 4, it works but when i change it to soemthing else, it doesnt work Another question does it always returns it in a 2-D array? and how do you examine $oTable.innerHTML or $oTable.innerText ?? Edited September 1, 2006 by d0n
DaleHohm Posted September 1, 2006 Posted September 1, 2006 I do write it in SciTe And when i put index as 4, it works but when i change it to soemthing else, it doesnt workAnother question does it always returns it in a 2-D array?But are you running the script using Tools -> Go or F5? If you were I think you'd get your error message in the SciTe console instead of a popup. You'd then also get the IE.au3 console messages.Yes, it is always a 2-D array. Please read the helpfile. Please go back and read my last reply. Please go off and work on your code for a while and try to answer your own questions. Come back when you have tried and are stumped and we'll help some more (and be prepared to show us the bruises on your forehead to prove that you really did try ).Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Moderators big_daddy Posted September 1, 2006 Moderators Posted September 1, 2006 Try this: #include <IE.au3> $sURL = "http://s7.travian.com/dorf1.php" $oIE = _IECreate($sURL) $oTable = _IETableGetCollection($oIE, 4) $aTableData = _IETableWriteToArray($oTable) For $i = 0 To UBound($aTableData) - 1 For $y = 0 To UBound($aTableData, 2) - 1 ConsoleWrite($aTableData[$i][$y] & @CRLF) Next Next
d0n Posted September 1, 2006 Author Posted September 1, 2006 it works but nothing really happens after i run it, what should it do?
Moderators big_daddy Posted September 1, 2006 Moderators Posted September 1, 2006 it works but nothing really happens after i run it, what should it do?If you are running script using SciTE, which you said you were, then look in the output pane for the values you were wanting.
d0n Posted September 1, 2006 Author Posted September 1, 2006 oh i see it now, 0 0 0 0 Lumber: Clay: Iron: Crop: 400 400 370 279 per hour per hour per hour per hour what if i only want part of it not the whole table?
Moderators big_daddy Posted September 1, 2006 Moderators Posted September 1, 2006 Something like this. #include <IE.au3> $sURL = "http://s7.travian.com/dorf1.php" $oIE = _IECreate($sURL) $oTable = _IETableGetCollection($oIE, 4) $aTableData = _IETableWriteToArray($oTable) For $i = 0 To UBound($aTableData, 2) - 1 ConsoleWrite($aTableData[2][$i] & @CRLF) Next
d0n Posted September 1, 2006 Author Posted September 1, 2006 (edited) if a text is say, 400/6000, how do i cut it up? if i only want 6000 part Another question i have is: I have another table, i've got the whole thing but when the message comes up it displays extra info This is the source of the table <td><b>6300</b> Resource units</td> This is my code #include <IE.au3> #include <GUIConstants.au3> $sURL = "http://s7.travian.com/dorf2.php" $oIE = _IECreate($sURL, 0, 0) _IENavigate ($oIE, "http://s7.travian.com/build.php?id=20") $oTable = _IETableGetCollection($oIE, 3) $aTableData = _IETableWriteToArray($oTable) MsgBox(4096, "TEST", $aTableData[1][0]) the out come of that is, 6300 Resource units, where i only want 6300. Edited September 1, 2006 by d0n
DaleHohm Posted September 1, 2006 Posted September 1, 2006 You're really asking to be spoon fed here... I'm afraid this piece of advice got lost in the flurry of questions five minutes apart... Please read the helpfile. Please go back and read my last reply. Please go off and work on your code for a while and try to answer your own questions. Come back when you have tried and are stumped and we'll help some more (and be prepared to show us the bruises on your forehead to prove that you really did try ). Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
d0n Posted September 1, 2006 Author Posted September 1, 2006 how am i being spood fed? this is a whole different question than the one before. I am trying to split a string which i have no clue how, i am through the tables/array part
DaleHohm Posted September 1, 2006 Posted September 1, 2006 Spend a few minutes with the helpfile before you ask for someone else's help. Use the search tab in the helpfile and enter "split string" - you shouldn't be shocked at what you find there. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
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