burger Posted November 10, 2006 Share Posted November 10, 2006 I'm trying to IETableWritetoArray for a web page. It works fine if at first I save the html file to my hard drive. However, I cannot retrieve the table directly via the Internet. Any ideas as to what might cause this? Link to comment Share on other sites More sharing options...
DaleHohm Posted November 10, 2006 Share Posted November 10, 2006 (edited) I'm trying to IETableWritetoArray for a web page. It works fine if at first I save the html file to my hard drive. However, I cannot retrieve the table directly via the Internet. Any ideas as to what might cause this?Did you try the example in the helpfile and compare it to what you are doing?If you are saving it to your disk, I'm guessing you're doing a righ-click, view source and saving it... if so you are likely in a FRAME and you need to use the _IEFrame* functions to get a reference to the frame containing the table before it will work for you.DaleEdit: AND you are probably getting a NoMatch error in the SciTe console... Edited November 10, 2006 by DaleHohm 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 Link to comment Share on other sites More sharing options...
burger Posted November 10, 2006 Author Share Posted November 10, 2006 (edited) Did you try the example in the helpfile and compare it to what you are doing?If you are saving it to your disk, I'm guessing you're doing a righ-click, view source and saving it... if so you are likely in a FRAME and you need to use the _IEFrame* functions to get a reference to the frame containing the table before it will work for you.DaleI'm using the File-Save As method. The word Frame does not occur in the code however could it be that I'm only saving a single frame using this method? When I use View-Source and search for "frame" it is not found either. There is however Javascript code galour and the tables are nested if that helps. I am using the code from the example. I'm using _IECreate for both the local and the online file. When using the local file it's the 6th table and it's 2 x 24. Online the 6th table is 2x2 and blank. I've tried changing the table number...nada. Thanks for your help Dale.TerryPS I'm not getting an error Edited November 10, 2006 by burger Link to comment Share on other sites More sharing options...
DaleHohm Posted November 10, 2006 Share Posted November 10, 2006 OK, so my guess appears to be wrong. I suggest you use this to check the HTML source and see if you can figure it out: ConsoleWrite(_IEBodyReadHTML($oIE) & @CR) to do more here we'll need a URL of the HTML code. 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 Link to comment Share on other sites More sharing options...
burger Posted November 10, 2006 Author Share Posted November 10, 2006 OK, so my guess appears to be wrong.I suggest you use this to check the HTML source and see if you can figure it out:ConsoleWrite(_IEBodyReadHTML($oIE) & @CR)to do more here we'll need a URL of the HTML code.DaleThat helped. The URL is password protected and posting the HTML won't help because thanks to your suggestion I now see what is happening. I need help resolving it however. The page orginally loads with input boxes. I have programmed AI to fill in the input boxes and hit a "view data" button which brings up the table I need. At that point I can View-Source and see the table code. However, using your suggestion above at this point still produces the orginal html without the table. The URL address remains the same with our without the table. Link to comment Share on other sites More sharing options...
DaleHohm Posted November 10, 2006 Share Posted November 10, 2006 That helped. The URL is password protected and posting the HTML won't help because thanks to your suggestion I now see what is happening. I need help resolving it however. The page orginally loads with input boxes. I have programmed AI to fill in the input boxes and hit a "view data" button which brings up the table I need. At that point I can View-Source and see the table code. However, using your suggestion above at this point still produces the orginal html without the table. The URL address remains the same with our without the table.Hmmm..._IEBodyReadHTML will grab a snapshot of the active document state -- View Source often grabs a stale state prior to dynamic changes (from Javascript routines for example). If you see it in the browser, _IEBodyReadHTML should get it. I would therefore question whether you are attached to the active browser window or whether the site is doing something tricky with a new window or an iFrame or something.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 Link to comment Share on other sites More sharing options...
burger Posted November 10, 2006 Author Share Posted November 10, 2006 Hmmm..._IEBodyReadHTML will grab a snapshot of the active document state -- View Source often grabs a stale state prior to dynamic changes (from Javascript routines for example). If you see it in the browser, _IEBodyReadHTML should get it. I would therefore question whether you are attached to the active browser window or whether the site is doing something tricky with a new window or an iFrame or something.DaleI figured it out Dale. I had an extra _IECreate. Without that, it still was different than the View-Source but I was able to track down the table using your suggestion. Thanks for you help and this great Function! This has been a real head banger for me. 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