Jump to content

Recommended Posts

Posted (edited)

le au3's webbrowser (_IECreateEmbedded()) don't download the image/music/flash,just show the text.

is it possible?

don't use regedit and _IEBodyWriteHTML.

#include <IE.au3>

_IE_DisplayImages(False)
$oIE = _IECreate()
_IE_DisplayImages(True)

; // HERE YOU CAN USE THE $oIE LIKE NORMAL WITHOUT ANYONE ELSE BOTHERED BY IT

Func _IE_DisplayImages($ivState)
    Local $svKeyPath = "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main"
    If $ivState Then
        RegWrite($svKeyPath, "Display Inline Images", "REG_SZ", "yes")
    Else
        RegWrite($svKeyPath, "Display Inline Images", "REG_SZ", "no")
    EndIf
EndFunc;==>_IE_DisplayImages
Edited by gooker
Posted

So how about you post your code? Because it's kinda hard to tell exactly how you're doing what you're doing if we can't see what you're doing to tell you if we see something that you might be doing wrong.

Posted (edited)

I've made this simple function to do this for me:

Func _IE_DisplayImages($ivState)
    Local $svKeyPath = "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main"
    If $ivState Then
        RegWrite($svKeyPath, "Display Inline Images", "REG_SZ", "yes")
    Else
        RegWrite($svKeyPath, "Display Inline Images", "REG_SZ", "no")
    EndIf
EndFunc;==>_IE_DisplayImages

Beware that you have to run this before starting the browser(as iexplorer reads this setting when it starts).

Edit: This only takes care of images, not videos and other content(I believe it's some activeX setting, but not quite sure which one).

Edit2:

Found which one that controls activeX(that's all javascript, and all other media content(from what I know), so here's another func for it:

Func _IE_AllowActiveX($ivState)
    Local $svKeyPath = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"
    If $ivState Then
        RegWrite($svKeyPath, "1200", "REG_DWORD", 0)
    Else
        RegWrite($svKeyPath, "1200", "REG_DWORD", 3)
    EndIf
EndFunc
Edited by FreeFry
Posted

ths everyone.

freefry 's function i used before, but it have a probem, so i dont want use it.

use this func,all the ie will dont show image;

my aim is just my small autoit program (monitor webpage,click some button) dont show image.

The webage has large image, and my net speed is low. so rewrite html dont fit me.

so my question: how to make the au3's ie func dont show image , at the same time the ie can show image .

(my english is not good :D )

Posted

So use INetGet to download the page (will just get you the html), read through it and remove any references to images, then use _IEDocWriteHTML to set the html of your embedded IE control to that html.

Posted

gooker, this is how you do it:

#include <IE.au3>

_IE_DisplayImages(False)
$oIE = _IECreate()
_IE_DisplayImages(True)

; // HERE YOU CAN USE THE $oIE LIKE NORMAL WITHOUT ANYONE ELSE BOTHERED BY IT

Func _IE_DisplayImages($ivState)
    Local $svKeyPath = "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main"
    If $ivState Then
        RegWrite($svKeyPath, "Display Inline Images", "REG_SZ", "yes")
    Else
        RegWrite($svKeyPath, "Display Inline Images", "REG_SZ", "no")
    EndIf
EndFunc;==>_IE_DisplayImages
Posted

gooker, this is how you do it:

#include <IE.au3>

_IE_DisplayImages(False)
$oIE = _IECreate()
_IE_DisplayImages(True)

; // HERE YOU CAN USE THE $oIE LIKE NORMAL WITHOUT ANYONE ELSE BOTHERED BY IT

Func _IE_DisplayImages($ivState)
    Local $svKeyPath = "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main"
    If $ivState Then
        RegWrite($svKeyPath, "Display Inline Images", "REG_SZ", "yes")
    Else
        RegWrite($svKeyPath, "Display Inline Images", "REG_SZ", "no")
    EndIf
EndFunc;==>_IE_DisplayImages

oh.that's true, ths !!!

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
×
×
  • Create New...