Sign in to follow this  
Followers 0
d0n

IE read

17 posts in this topic

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

Share this post


Link to post
Share on other sites



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')

Share this post


Link to post
Share on other sites

mm after reading it, i am still not quite sure how to use it.

do i have to do a include?

i've never done this kind of stuff before lol

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

yea i was having a little trouble looking for ID/name :D

thanks for helping!

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

link

heres a link to a part that you can access without username i think, let me know if it doesn't work

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

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

and what is so bad about that forum? lol just want to know :D

Edited by d0n

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

oh, thanks ! :D

Share this post


Link to post
Share on other sites

oh, thanks ! :D

Just curious what game is it for?

Share this post


Link to post
Share on other sites

WoW, just helping my friend with this game since he was too lazy to do it, and i wanted to learn more about autoit :D

Share this post


Link to post
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
Sign in to follow this  
Followers 0