d0n Posted January 28, 2008 Share Posted January 28, 2008 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 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 28, 2008 Share Posted January 28, 2008 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 More sharing options...
d0n Posted January 28, 2008 Author Share Posted January 28, 2008 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 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 28, 2008 Share Posted January 28, 2008 (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 January 28, 2008 by Thatsgreat2345 Link to comment Share on other sites More sharing options...
d0n Posted January 28, 2008 Author Share Posted January 28, 2008 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 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 28, 2008 Share Posted January 28, 2008 i just want to record all the names for attendance that this guy posts on a forumi am not sure what type of forum this is, its like any other normal ones from phpbb ? not surestill going through those 2 functions 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 More sharing options...
d0n Posted January 28, 2008 Author Share Posted January 28, 2008 yea i was having a little trouble looking for ID/name thanks for helping! Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 28, 2008 Share Posted January 28, 2008 Try this with your forum #include <IE.au3> $oIE = _IECreate('LINKHERE') $oTags = $oIE.document.getElementsByTagName('DIV') For $oTag in $oTags If Not _IEPropertyGet($oTag,'innerhtml') = 0 Then $Text = _IEPropertyGet($oTag,'innertext') ExitLoop EndIf Next MsgBox(0,'',$Text) Link to comment Share on other sites More sharing options...
d0n Posted January 28, 2008 Author Share Posted January 28, 2008 --> 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 More sharing options...
Thatsgreat2345 Posted January 28, 2008 Share Posted January 28, 2008 --> 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_InvalidDataTypei donno if its my fault or not :Sbut it gives me a msgbox with 0Give me a link to your forum. Link to comment Share on other sites More sharing options...
d0n Posted January 28, 2008 Author Share Posted January 28, 2008 linkheres a link to a part that you can access without username i think, let me know if it doesn't work Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 28, 2008 Share Posted January 28, 2008 (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 January 28, 2008 by Thatsgreat2345 Link to comment Share on other sites More sharing options...
d0n Posted January 28, 2008 Author Share Posted January 28, 2008 (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 Edited January 28, 2008 by d0n Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 28, 2008 Share Posted January 28, 2008 (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 January 28, 2008 by Thatsgreat2345 Link to comment Share on other sites More sharing options...
d0n Posted January 28, 2008 Author Share Posted January 28, 2008 oh, thanks ! Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 28, 2008 Share Posted January 28, 2008 oh, thanks ! Just curious what game is it for? Link to comment Share on other sites More sharing options...
d0n Posted January 28, 2008 Author Share Posted January 28, 2008 WoW, just helping my friend with this game since he was too lazy to do it, and i wanted to learn more about autoit 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