Jump to content

IE Load Portion of Webpage Only


Recommended Posts

You have to load the full page and remove all, you don't want:

CODE
#include <IE.au3>

;create IE hidden

$oIE = _IECreate("www.autoitscript.com",0,0)

; Read the body HTML

$sHTML = _IEBodyReadHTML ($oIE)

; delete the text before

$trim = StringInStr($sHTML,"<h2>AutoIt</h2>")

$sHTML = StringTrimLeft($sHTML,$trim-1)

;delete the text after

$trim = StringInStr($sHTML,"<h2>ImageX GUI (GImageX)</h2>")

$sHTML = StringLeft($sHTML,$trim-1)

; format it to the left ( otherwise it's centered )"

$sHTML = '<div align="left">' & $sHTML & '</div>'

;write new body

_IEBodyWriteHTML ($oIE, $sHTML)

; show IE

_IEAction($oIE,"visible")

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Say i have a webpage loaded, but i only want a section to show up in the GUI instead of seeing the extra "stuff" (banners, sidebars)

Simple... open it in Firefox with AdBlock Plus loaded!

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...