KaFu Posted December 16, 2008 Share Posted December 16, 2008 Hi Forum, I use the _IEDocWriteHTML() function in my program SMF to display duplicate picture files. Now I experienced that with large gif files (~1MB) which I resize to cover the whole 350x350 pixels pre-defined for the browser the display speed and program responsiveness stalls dramatically. The program does not crash, but it takes a hell lot of time for it to respond. I use a line of code as follows: _IEDocWriteHTML($oIE[$y], $html_body_and_style & '<table><tr><td style="position:absolute;top:0px;text-align:center;vertical-align:middle;margin:0px;padding:0px;width:350px;height:350px;border:0pt solid #000000;"><img src="' & FileGetShortName($dups_result[$y]) & '"></td></tr></table>') Now my guess is, that AU waits for the page to finish rendering. Is there a way to return return immediately after _IEDocWriteHTML() like with the $f_wait option in _IENavigate() ? Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
DaleHohm Posted December 17, 2008 Share Posted December 17, 2008 Hi Forum, I use the _IEDocWriteHTML() function in my program SMF to display duplicate picture files. Now I experienced that with large gif files (~1MB) which I resize to cover the whole 350x350 pixels pre-defined for the browser the display speed and program responsiveness stalls dramatically. The program does not crash, but it takes a hell lot of time for it to respond. I use a line of code as follows: _IEDocWriteHTML($oIE[$y], $html_body_and_style & '<table><tr><td style="position:absolute;top:0px;text-align:center;vertical-align:middle;margin:0px;padding:0px;width:350px;height:350px;border:0pt solid #000000;"><img src="' & FileGetShortName($dups_result[$y]) & '"></td></tr></table>') Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
KaFu Posted December 17, 2008 Author Share Posted December 17, 2008 (edited) Thanks for the hint, but after tracking it yesterday evening in the include to this part... $o_object.document.Write($s_html) $o_object.document.close()oÝ÷ ٩ݶ¼¢hr¦z{hºÛazw±¶X§y«¢+Øí}%1½]¥Ð ÀÌØí½QµÀ¤oÝ÷ ÚìzÛb®¶seôTÆöEvEFÖV÷WBoÝ÷ Ù·¢·°¢é]mÂä÷®Ø^íý²z(¶«Á¬©ÚÂäjº.Ó©¦"µëh¶¬ CZ¾(µëzk-£ +«¢+ØÀÌØí½}½©Ð¹¹Ù¥Ñ so I guess thats where the difference kicks in an why setting the timeout for _IEDocWriteHTML() would not work as expected. As next thing I will write the HTML to a temp file and give it a try. Will post an example later this day (and also hopefully a work-around ) Thanks for the help Dale. Best Regards Edited December 17, 2008 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
DaleHohm Posted December 17, 2008 Share Posted December 17, 2008 I really don't understand what you just said. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
KaFu Posted December 17, 2008 Author Share Posted December 17, 2008 _IELoadWaitTimeout(0) does not work for me , will post a working example later. Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
KaFu Posted December 17, 2008 Author Share Posted December 17, 2008 So, i compiled two test-scripts demonstrating what I meant:www.funk.eu/Test_IEDocWriteHTML.zipSadly it seems that _IENavigate() shows the same behavior ... in the beginning the GUI is still responsive, but wait some 5 to 10 seconds an then click the Test MsgBox Button and you'll see that the GUI has stalled. I fear the resizeing of the gif just takes too much computing power and makes the embedded IE unresponsive. But I think there should be a way to unlink the GUI from IE's unresponsivness...Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
DaleHohm Posted December 17, 2008 Share Posted December 17, 2008 It is GUIGetMsg() that is stalling out. Oddly, if you fully occlude the AitoIt GUI it starts polling and processing again [just stick this before the WEnd to see evidence: ConsoleWrite(".")]. This is in the GUI code. I don't have any further ideas. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
KaFu Posted December 18, 2008 Author Share Posted December 18, 2008 Dale, thanks for looking into it. As a workaround I'll use something like this $filename = @ScriptDir & '\homer.gif' $html_body_and_style = '<body style="font:11px arial,verdana;margin:0px;padding:0px;"><meta http-equiv="content-type" content="application/xhtml+xml;charset=utf-8" />' _IEDocWriteHTML($oIE, $html_body_and_style & '<table><tr><td style="position:absolute;top:0px;text-align:center;vertical-align:middle;margin:0px;padding:0px;width:480px;height:480px;border:0pt solid #000000;"><img style="width:480px;height:480px;" src="' & $filename & '"></td></tr></table>') if StringInStr(stringright($filename,4),".gif") then _IEAction ($oIE, "stop") If the file-extension is .gif I send a stop command to the IE. This way at least the GUI stays responsive. Guess I'll fill a bug report with this one. Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) 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