Jump to content
Sign in to follow this  
Alexxander

Inetread questiion

Recommended Posts

JLogan3o13

 

it seems that _IEBodyReadText is only for getting text from already opened ie 

i want to get text from a site for example "facebook.com"

 

 when i use inetread("facebook.com") i get the source code of the page.

i want to get the text in that webpage 

"Connect with friends and thFind more of what you're looking for with Graph Search"

Share this post


Link to post
Share on other sites

I personally only use it for reading files, have never simply pointed it at the URL to get source (silly me I use _INetGetSource for that). I would think the easiest way is with _IEBodyReadText, and make the window invisible if you want:

#include <IE.au3>
#include <MsgBoxConstants.au3>

Local $oIE = _IECreate("www.autoitscript.com", 0, 0)
Local $sText = _IEBodyReadText($oIE)
MsgBox($MB_SYSTEMMODAL, "Body Text", $sText)

_IEQuit($oIE)

I am sure someone much smarter than I will wander along, and may have another way of doing it.

 

Edit: Or if the window is already open:

#include <IE.au3>
#include <MsgBoxConstants.au3>
 
Local $oIE = _IEAttach("http://stevedonovan.github.io/winapi/api.html", "url", 1)
Local $sText = _IEBodyReadText($oIE)
MsgBox($MB_SYSTEMMODAL, "Body Text", $sText)
 
_IEQuit($oIE)
Edited by JLogan3o13

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  

×
×
  • Create New...