Killer_Hammster Posted October 19, 2006 Share Posted October 19, 2006 Hello, its me again, I was woundering if there is anyway to read a specific line of text from a webpage or a select few lines then return them? I have tryed lots of differnt things but sofar I can only return the whole page, and I only need 1 or 2 lines, anyone know how? Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted October 19, 2006 Moderators Share Posted October 19, 2006 Can you provide a link to the webpage or at least a section of the source that includes the text you are wanting. Link to comment Share on other sites More sharing options...
Killer_Hammster Posted October 19, 2006 Author Share Posted October 19, 2006 This part I need the program to look at looks like this <div class="fw-text"> <!-- ParagraphBodyStart --><P>Block 1</P> <P>## . ## . ## . ##</P> <P>## . ## . ## . ##</P> <P>## . ## . ## . ##</P> <P> </P> <P>Block 2</P> <P>## . ## . ## . ##</P> <P>## . ## . ## . ##</P> <P>## . ## . ## . ##</P><!-- ParagraphBodyEnd --> </div> If you really need the website I can post that if you would like Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted October 19, 2006 Moderators Share Posted October 19, 2006 Assuming this webpage does not contain frames this should work. #include <IE.au3> $sText = "" $sURL = "www.YourWebpage.com" $oIE = _IECreate($sURL) $oDivs = _IETagNameGetCollection($oIE, "DIV") For $oDiv In $oDivs If $oDiv.className = "fw-text" Then $sText = $oDiv.innerText ExitLoop EndIf Next ConsoleWrite($sText & @CR) Link to comment Share on other sites More sharing options...
macdad Posted January 2, 2011 Share Posted January 2, 2011 this is really close to what im looking for but i want to make it do one of 2 mouse clicks 1 if it matches and the other if it doesnt and also is there any way to make it look for the first one on the page since there is multiple lists of them for example if u play games on fb your gift page im wanting it to look at the first gift and if it mates then to do mouse click here and there both what im wanting to use this for and facebook gift page is written with <div> so there is multiple. maybe if it looks in a specific area of the page if thats possable. i will be watching this thread for a reply Link to comment Share on other sites More sharing options...
Recommended Posts