AcidCorps Posted August 17, 2007 Share Posted August 17, 2007 I've been searching around and found quite a few topics but can't seem to figure it out What I want to do is open a webpage and then have autoit search for a spacific phrase The goal of this is to detect if I am logged in or not after which if not I will be logged in The phrase to look for would be in $Search I've tried a few different things but at this point the only part I have working is opening the webpage Link to comment Share on other sites More sharing options...
mikehunt114 Posted August 17, 2007 Share Posted August 17, 2007 Try using _IEBodyReadText, and then StringInStr the returned text. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
AcidCorps Posted August 17, 2007 Author Share Posted August 17, 2007 (edited) Ok so I came up with this (I realized autoit's forum uses the same IP.Board board so if it will work on AutoIt's forums it'll will work for my other forum") $iPage = "http://www.autoitscript.com/forum/index.php?" $iBody = _IEBodyReadText($iPage) $OutPut = StringInStr($iBody, "AcidCorps") MsgBox(0,"",$OutPut) but it shows up as 0 even when I am logged in Edited August 17, 2007 by AcidCorps Link to comment Share on other sites More sharing options...
mikehunt114 Posted August 17, 2007 Share Posted August 17, 2007 (edited) Better have a look at how the IE functions work. When you said you could open the webpage, I assumed that you were already familiar with and using IE.au3. Have a look at this and see if it helps: #include <IE.au3> $url = "http://www.autoitscript.com/forum/index.php?" $oIE = _IECreate($url, 1) $iBody = _IEBodyReadText($oIE) If StringInStr($iBody, "AcidCorps") Then MsgBox(0,"","Success!") Edited August 17, 2007 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
AcidCorps Posted August 17, 2007 Author Share Posted August 17, 2007 Ok that works great except that I use Firefox instead of Internet Explorer Link to comment Share on other sites More sharing options...
mikehunt114 Posted August 17, 2007 Share Posted August 17, 2007 Then you're on your own. ControlSend and ControlClick will be your friends. FireFox does not support COM the way IE does. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
AcidCorps Posted August 17, 2007 Author Share Posted August 17, 2007 Ok well thank you for your help 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