gooker Posted April 11, 2009 Share Posted April 11, 2009 (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 April 16, 2009 by gooker Link to comment Share on other sites More sharing options...
jvanegmond Posted April 11, 2009 Share Posted April 11, 2009 Use RegWrite or _IEBodyWriteHTML. github.com/jvanegmond Link to comment Share on other sites More sharing options...
gooker Posted April 11, 2009 Author Share Posted April 11, 2009 I said don't use _IEBodyWriteHTML, Any idea? Link to comment Share on other sites More sharing options...
jvanegmond Posted April 11, 2009 Share Posted April 11, 2009 RegWrite. github.com/jvanegmond Link to comment Share on other sites More sharing options...
gooker Posted April 13, 2009 Author Share Posted April 13, 2009 don't use regedit ,i said .... Link to comment Share on other sites More sharing options...
exodius Posted April 13, 2009 Share Posted April 13, 2009 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. Link to comment Share on other sites More sharing options...
jvanegmond Posted April 13, 2009 Share Posted April 13, 2009 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. github.com/jvanegmond Link to comment Share on other sites More sharing options...
FreeFry Posted April 13, 2009 Share Posted April 13, 2009 (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_DisplayImagesBeware 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 April 13, 2009 by FreeFry Link to comment Share on other sites More sharing options...
gooker Posted April 15, 2009 Author Share Posted April 15, 2009 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 ) Link to comment Share on other sites More sharing options...
exodius Posted April 15, 2009 Share Posted April 15, 2009 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. Link to comment Share on other sites More sharing options...
gooker Posted April 15, 2009 Author Share Posted April 15, 2009 hi exodius i know what you mean. but how to get next page html after Submit a Form? Link to comment Share on other sites More sharing options...
jvanegmond Posted April 15, 2009 Share Posted April 15, 2009 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 github.com/jvanegmond Link to comment Share on other sites More sharing options...
gooker Posted April 15, 2009 Author Share Posted April 15, 2009 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 !!! Link to comment Share on other sites More sharing options...
jvanegmond Posted April 15, 2009 Share Posted April 15, 2009 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.. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now