Neeeewbie Posted January 21, 2014 Share Posted January 21, 2014 (edited) I googled and tried several differnt things (I'm not very skilled basicly cut and past). This being the closest I think I came: #include <IE.au3> $oIE = _IECreate("The website") $CurrentLevel = "" $tags = $oIE.document.GetElementsByTagName("div") For $tag in $tags $class_value = $tag.GetAttribute("class") If string($class_value) = "profileXpLevel" Then $CurrentLevel=IEBodyReadText($class_value) MsgBox(0, "Level: ", $CurrentLevel) ExitLoop Next The msgbox comes up empty. It gets to the <div class="profileXpLevel"> (I think) but Idk how to read the <h5>Level 187</h5> inside of it? Edited January 21, 2014 by Neeeewbie Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 21, 2014 Moderators Share Posted January 21, 2014 (edited) Hi, Neeeewbie. Is the site public where you can post a link, or can you please post the full HTML. You should be able to read the inner text, but it is difficult to tell from just that small snippet. Edited January 21, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Solution somdcomputerguy Posted January 21, 2014 Solution Share Posted January 21, 2014 (edited) I posted in a similar topic not to long ago with code that does work, but probably can be done more efficiently. Especially with some of the IE functions. But here it goes anyway.. #include <INet.au3> #include <String.au3> Opt('MustDeclareVars', 1) Local $URL = "", $Needle, $Haystack, $Needle_Start, $Needle_End $Haystack = _INetGetSource($URL) $Needle_Start = '<div class="profileXpLevel"><h5>' $Needle_End = '</h5></div>' $Needle = _StringBetween($Haystack, $Needle_Start, $Needle_End) MsgBox(4096, 'Needle in a Haystack', $Needle[0]) Note to edit the $URL variable accordingly. This is the post I made before - , feel free to try it out if you care. Edited January 21, 2014 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Neeeewbie Posted January 22, 2014 Author Share Posted January 22, 2014 (edited) Thanks, your code worked. Edited January 22, 2014 by Neeeewbie somdcomputerguy 1 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