Jump to content

IE read


d0n
 Share

Recommended Posts

what would be the best way to gather info from the 1st post in a forum

i know that i can do trim text after getting it from IEbodyreadtext, but i am sure theres a better way to do this :S

Check this out

http://msdn2.microsoft.com/en-us/library/ms536439.aspx

Then you can use _IEProperty($oTag,'innertext')

Link to comment
Share on other sites

Just curious what type of forum sit his, all are created differently.

Check out _IEGetObjById and _IEGetObjByName

If they don't have ID's or Names then

You can get every type of tag.

Here is a bad example but.

#include <IE.au3>

$oIE = _IECreate('http://www.autoitscript.com/forum/index.php?showtopic=62836')
$oTags = $oIE.document.getElementsByTagName('DIV')
For $oTag in $oTags
    MsgBox(0,'',_IEPropertyGet($oTag,'innertext'))
NextoÝ÷ جµË«¬Â­ËaÇè¬@ÈLw«z+mëmz·±jjey«­¢+Ø¥¹±Õ±Ðí%¹ÔÌÐì((ÀÌØí½%ô}%
ÉÑ Ìäí¡ÑÑÀè¼½ÝÝܹÕѽ¥ÑÍÉ¥Áй½´½½ÉÕ´½¥¹à¹Á¡ÀýÍ¡½ÝѽÁ¥ôØÈàÌØÌäì¤(ÀÌØí½Qô}=©    å% ÀÌØí½%°ÌäíÁ½ÍдÐÜÀÌÀÜÌäì¤)5Í   ½à À°ÌäìÌäì±}%AɽÁÉÑåÐ ÀÌØí½Q°Ìäí¥¹¹ÉÑáÐÌä줤
Edited by Thatsgreat2345
Link to comment
Share on other sites

i just want to record all the names for attendance that this guy posts on a forum

i am not sure what type of forum this is, its like any other normal ones from phpbb ? not sure

still going through those 2 functions :D

Link to comment
Share on other sites

i just want to record all the names for attendance that this guy posts on a forum

i am not sure what type of forum this is, its like any other normal ones from phpbb ? not sure

still going through those 2 functions :D

With PHPBB they do not give specific ID/Name.

I'll whip something up that works with PHPBB forums.

Link to comment
Share on other sites

--> IE.au3 V2.3-1 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch

--> IE.au3 V2.3-1 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType

--> IE.au3 V2.3-1 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

--> IE.au3 V2.3-1 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType

--> IE.au3 V2.3-1 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

--> IE.au3 V2.3-1 Warning from function _IEGetObjByName, $_IEStatus_NoMatch

--> IE.au3 V2.3-1 Error from function _IEAction, $_IEStatus_InvalidDataType

i donno if its my fault or not :S

but it gives me a msgbox with 0

Link to comment
Share on other sites

--> IE.au3 V2.3-1 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch

--> IE.au3 V2.3-1 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType

--> IE.au3 V2.3-1 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

--> IE.au3 V2.3-1 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType

--> IE.au3 V2.3-1 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

--> IE.au3 V2.3-1 Warning from function _IEGetObjByName, $_IEStatus_NoMatch

--> IE.au3 V2.3-1 Error from function _IEAction, $_IEStatus_InvalidDataType

i donno if its my fault or not :S

but it gives me a msgbox with 0

Give me a link to your forum.

Link to comment
Share on other sites

This should work

#include <IE.au3>

$oIE = _IECreate('http://mergealliance.com/forum/viewtopic.php?t=190')
$oTags = $oIE.document.getElementsByTagName('SPAN')
For $oTag in $oTags
    If $oTag.className = 'postbody' Then
        $Text = _IEPropertyGet($oTag,'innertext')
        ExitLoop
    EndIf
Next
MsgBox(0,'',$Text)
Edited by Thatsgreat2345
Link to comment
Share on other sites

ah ty, would you mind telling me what you did there? i dont really get it

Basically I got all the span tags as obejcts, then I went through each one of them. Since each span only has a class name then I used className as defined here

http://msdn2.microsoft.com/en-us/library/ms533560(VS.85).aspx

To get the class of each Span. Since each post is named postbody which span tag has class name of postbody firs then it will get the text, and exit the loop.

Then it displays the text.

Edit:

It isn't modded, still has original header.

So on and so forth.

I only hated it as I had already made something that grabs the first post for a PHPBB forum, but it was modded and used DIV tags, so I had to remake the example lol thats really only the reason why.

Edited by Thatsgreat2345
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...