Grimster Posted August 11, 2008 Share Posted August 11, 2008 Frustrated. Im trying to pull some text from a webpage. This is actually IE running a small VB application in IE from an application server.No, I dont want to use the mouse commands to send the mouse over and select and copy the text into the clipboard as thats way too unreliable.How can I use the IE management commands WITHOUT specifying the URL but by specifying the IE window name. I cant use URL because the URL is always the same since this is an application in IE.for example, the _IEBodyReadText command. How can I use this command on a specific IE window NAME. I cant use URLs. Link to comment Share on other sites More sharing options...
DaleHohm Posted August 11, 2008 Share Posted August 11, 2008 Boy, put some of that energy into reading the documentation. _IEAttach has seven unique modes of matching an existing IE window. Surely you can make one of them work for you. 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...
Grimster Posted August 13, 2008 Author Share Posted August 13, 2008 Boy, put some of that energy into reading the documentation. _IEAttach has seven unique modes of matching an existing IE window. Surely you can make one of them work for you.DaleThis just does not not work. The autoit help docs are awful to explain IE Management. If someone can show me how to pull the text from say....www.google.com WITHOUT using the URL but with the IE window title then this would greatly help. Amazing how this such simple task looks as if it can not be done with all these commands. Link to comment Share on other sites More sharing options...
DaleHohm Posted August 13, 2008 Share Posted August 13, 2008 I really can't believe you have read the documentation and can still make that statement. You make rash, emotional statements and you show none of your work... You're on your own son. 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...
Grimster Posted August 13, 2008 Author Share Posted August 13, 2008 I really can't believe you have read the documentation and can still make that statement. You make rash, emotional statements and you show none of your work...You're on your own son. DaleI think you know as well it cant or is too difficult to be done. You have to admit its such a simple task and yet with all the commands its difficult or not even possible to be done. Link to comment Share on other sites More sharing options...
Grimster Posted August 13, 2008 Author Share Posted August 13, 2008 I finally got it. #include <IE.au3> $oIE = _IEAttach ("Google - Microsoft Internet Explorer", "WindowTitle") $sText = _IEBodyReadText ($oIE) MsgBox(0, "Body Text", $sText) Still, the docs for IE management are simply awfully put together and explained. Get ride of the "_IE_Example " as this only makes things illogical when trying to learn the commands. Completely illogical. Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 13, 2008 Share Posted August 13, 2008 (edited) I think you know as well it cant or is too difficult to be done. You have to admit its such a simple task and yet with all the commands its difficult or not even possible to be done.Show us a short script or your own using _IEAttach() to attach to an existing Google window, and doing something with it, like getting the Body HTML. If it takes you more than 5 lines of code to get and display the result (it can be done in two, or three counting the #include line), you have NOT read the help file or tried the examples there. If you can't make it work, post what you've got and you'll get help with understanding it.Childish petulant comments are not going to prod people into writing your script for you. Edited August 13, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 13, 2008 Share Posted August 13, 2008 I finally got it.#include <IE.au3>$oIE = _IEAttach ("Google - Microsoft Internet Explorer", "WindowTitle")$sText = _IEBodyReadText ($oIE)MsgBox(0, "Body Text", $sText)Still, the docs for IE management are simply awfully put together and explained. Get ride of the "_IE_Example " as this only makes things illogical when trying to learn the commands. Completely illogical.AutoIt is a community project. If you can write better and submit it in a grown up fashion, it will be changed. But Dale is pretty darn good at it, and it seems VERY unlikely you can do better. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Grimster Posted August 13, 2008 Author Share Posted August 13, 2008 (edited) AutoIt is a community project. If you can write better and submit it in a grown up fashion, it will be changed. But Dale is pretty darn good at it, and it seems VERY unlikely you can do better. Whatever, I dont think so. The lack of essential points makes it hard for the beginner to learn these IE commands. Using the IE_Example in example scripts is illogical and does NOT correctly explain how the command is executed. Sure "Dale" maybe good at scripting in Autoit but far from good at teaching or explaining.As the saying goes, A poor teacher requires mind reading students. Humans are not mind readers.... Edited August 13, 2008 by Grimster Link to comment Share on other sites More sharing options...
Grimster Posted August 13, 2008 Author Share Posted August 13, 2008 (edited) This is getting ridiculous. You cant read a specific location from a 2D array created by _IETableWriteToArray. Array commands are not compatible with the array created by _IETableWriteToArray. #include <IE.au3> #include <Array.au3> $oIE = _IEAttach ("webpage with table", "WindowTitle") <---webapage selected with a table $oTable = _IETableGetCollection ($oIE, 1) <----Table 1 selected $aTableData = _IETableWriteToArray ($oTable, true) <---Table 1 written to 2D array _ArrayDisplay($aTableData, "$aTable") <--- Displays 2D array with info from table _ArrayToClip($aTableData, 2,2) <---ERRORs out. No command will read from the 2D array. MsgBox(0, "_ArrayToClip() Test", ClipGet()) "C:\Program Files\AutoIt3\Include\Array.au3 (1130) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $sResult &= $avArray[$i] & $sDelim $sResult &= ^ ERROR" Edited August 13, 2008 by Grimster Link to comment Share on other sites More sharing options...
Skruge Posted August 13, 2008 Share Posted August 13, 2008 This is getting ridiculous. You cant read a specific location from a 2D array created by _IETableWriteToArray. Array commands are not compatible with the array created by _IETableWriteToArray. ... _ArrayDisplay($aTableData, "$aTable") <--- Displays 2D array with info from table _ArrayToClip($aTableData, 2,2) <---ERRORs out. No command will read from the 2D array.You sound pretty convinced. Have you even tried reading a specific location in a 2D array?MsgBox(0, "Who needs a function?", $aTableData[2][2])_ArrayDisplay works with 2D arrays. _ArrayToClip doesn't because it wasn't designed to. Instead of blaming the documentation and insulting those of us who are here to help out, you should be trying to get a better understanding. Feel free to ask questions and seek advice, but lose the attitude. [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 13, 2008 Share Posted August 13, 2008 This is getting ridiculous. You cant read a specific location from a 2D array created by _IETableWriteToArray...The only appropriate reply left is to quote the sage philosopher: You're on your own son. -Dale - Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Grimster Posted August 16, 2008 Author Share Posted August 16, 2008 You sound pretty convinced. Have you even tried reading a specific location in a 2D array?MsgBox(0, "Who needs a function?", $aTableData[2][2])_ArrayDisplay works with 2D arrays. _ArrayToClip doesn't because it wasn't designed to. Instead of blaming the documentation and insulting those of us who are here to help out, you should be trying to get a better understanding. Feel free to ask questions and seek advice, but lose the attitude.Well geez thanks for letting us know in the documents. I mean who would think a command SPECIFICALLY for arrays would not work for an ARRAY created by _IETableWriteToArray. Autoit is good but it has some SERIOUS compatibility issues with its OWN commands. Why is this a problem? Because it creates complete LOGICLESS scripting. Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 16, 2008 Share Posted August 16, 2008 Well geez thanks for letting us know in the documents. I mean who would think a command SPECIFICALLY for arrays would not work for an ARRAY created by _IETableWriteToArray. Autoit is good but it has some SERIOUS compatibility issues with its OWN commands. Why is this a problem? Because it creates complete LOGICLESS scripting.The _ArrayToClip() is not a native AutoIt function, but is contained in the _Array.au3 UDF. Simply modify the function as required, or write your own from scratch. All you have to do is the appropriate For/Next loops to assemble the 2D array's data (or 3D or 4D, etc.) into a single string, delimited any way you like, and ClipPut() the string....but that would take more effort than whining about it. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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