VVDOOM Posted January 14, 2012 Share Posted January 14, 2012 Hello: I have used AutoIT for many things already, but I am not a guru with it. I have a script that I run, it opens a window and has buttons on it. I hit different buttons to do different things. I need to read a web page. I am using _IEAttach so it will use the current page I am on. I have tried using _INetGetSource, _IEDocReadHTML, _IEBodyReadText, etc. like: $sHTML = _INetGetSource ($url) MsgBox (0, "duh", $sHTML) trying many similar things like this, but I just cannot get it to read the page. at best i get a msgbox opened with a 0 in it. If I can pull the information then I should be able to extract certain info into variables which is my goal. Any help would be appreciated.. Also, is there a place where AutoIT guru's go to offer services writing programs?? I would be willing to just pay someone to help me get my script doing what i need it to. I would love saving the time and head aches involved with trying to figure these things out. I am sure the solution I am looking for is like common knowledge to some gurus here, but it is difficult for me right now.. THANKS.. Link to comment Share on other sites More sharing options...
Robjong Posted January 14, 2012 Share Posted January 14, 2012 Hi, _IEDocReadHTML is the function you should be using, perhaps you can post your code with _IEDocReadHTML so we can check what went wrong. #include <IE.au3> $oIE = _IEAttach("", "instance", 1) ; get the first instance of IE $sHTML = _IEDocReadHTML($oIE) ; get the HTML source of the current page ConsoleWrite($sHTML & @CRLF) Link to comment Share on other sites More sharing options...
VVDOOM Posted January 14, 2012 Author Share Posted January 14, 2012 Here is the function I have that runs when i click the button. i used a sample web page in this example, it is not the page ill need to scan, but if i can learn how to scan a page ill be one step closer. It pulls up the messag box but there is only a 0 in the message box.. so not sure what is going wrong.. i also tried putting in $url instead of $oIE but still only the 0 shows up. ---------------------------------------------------------- Func ButtonFunction1() $url = "http://www.n17.com/" $oIE = _IEAttach ("Network 17 - Windows Internet Explorer") $sHTML = _IEDocReadHTML ($oIE) MsgBox(0, "DUH", $sHTML) EndFunc 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