Sign in to follow this  
Followers 0
Iczer

Load image in IE when "Display Inline Images" is set to "no"

2 posts in this topic

How I can make images on some page in IE load, when in browser "Display Inline Images" is set to "no" without using mouse to automate context menu ?

#include <IE.au3>
OnAutoItExitRegister("_Exit")
AutoItSetOption ("WinTitleMatchMode", 2)

RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'Display Inline Images', 'REG_SZ', 'no')
Sleep(888)
$oIE = _IECreate("http://www.autoitscript.com/site/autoit/graphics/", 1)

$oImgs = $oIE.document.images

For $oImg In $oImgs
    ;Load disabled image-----------
    
    ;$oImg.media.load()
    ;$oImg.load()
    ;$oImg.show()
    $oImg.style.display = 'inline'

    ;------------------------------
    ; Scroll to next image
    $t = TimerInit()
    Do
        Sleep(33)
        $redyState = $oImg.readyState
    Until ($redyState = "complete") Or ($redyState = "failed") Or TimerDiff($t) > 3333
    $oImg.scrollIntoView()
    Sleep(888)
Next
Exit

Func _Exit()
    RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main', 'Display Inline Images', 'REG_SZ', 'yes')
EndFunc

Share this post


Link to post
Share on other sites



No one know?

Then maybe - as first step - how i can get context menu from some element (image) ?

$oRightClick = $oIE.document.createEventObject("MouseEvent")
$oRightClick.button = 2
$oImg.fireevent("onclick",$oRightClick)

but do not work...

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