Jump to content

Recommended Posts

Posted

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

Posted (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 by AcidCorps
Posted (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 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]
Posted

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]

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...