Sign in to follow this  
Followers 0
gooker

[SOLVED]Webbrowser don't show img flash etc.

14 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



I said don't use _IEBodyWriteHTML,

Any idea?


Share this post


Link to post
Share on other sites

don't use regedit ,i said ....


Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

gooker, there are two known methods that work fine for your problem. Let's start with you telling us why can't you use them.

It's like I posted on this forum that I want to add two numbers together but you can't use addition.

Share this post


Link to post
Share on other sites

#8 ·  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

Share this post


Link to post
Share on other sites

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 )


Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

hi exodius

i know what you mean. but how to get next page html after Submit a Form?


Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 !!!


Share this post


Link to post
Share on other sites

If you just asked the right question from the start you would have saved us both a lot of time. Next time, if you say "Don't use method X" tell them why not to use this method and show them what you have tried yourself..

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  
Followers 0