Jump to content

Embedded IE and AnimateWindow don't get along


therks
 Share

Recommended Posts

So I have this problem, not sure if it's overcome-able, but I hope so. I create an embedded IE object, and toss it in my GUI. Now whenever I use the AnimateWindow function (include found here) to show or hide the window the IE object gets all glitchy looking. Sometimes it goes all white, other times the content just gets all weird looking.

Any ideas if this can be prevented? Or am I just stuck with it?

#include <IE.au3>
#include <_Animatewindow.au3>

$oIE = _IECreateEmbedded()

$gui = GUICreate('', 200, 200)
$bt_Refocus = GUICtrlCreateButton('', -100, 0, 1, 1)
$ob_Main = GUICtrlCreateObj($oIE, 10, 10, 180, 180)
_IENavigate($oIE, 'about:blank')

_IEDocWriteHTML ($oIE, _
    '<body bgcolor="blue" text="white">' & @CRLF & _
    '<button id="closeBtn">Close</button><br/>' & _
    'Click the button to close, or wait for 5 seconds.')
_AnimateWindow($gui, '', 2000, BitOR($WINANI_RIGHTTOLEFT, $WINANI_BOTTOMTOTOP))
GUISetState()


$oCloseObj = _IEGetObjByName($oIE, 'closeBtn')
If Not @error Then
    $oCloseEvt = ObjEvent($oCloseObj, 'closeBtn_')
EndIf

Sleep(5000)

_AnimateWindow($gui, '', 2000, BitOR($WINANI_RIGHTTOLEFT, $WINANI_BOTTOMTOTOP, $WINANI_HIDE))

Func closeBtn_onclick()
    _AnimateWindow($gui, '', 2000, BitOR($WINANI_ALPHA, $WINANI_HIDE))
    Exit
EndFunc
Edited by Saunders
Link to comment
Share on other sites

Suggest you try embedding another graphically rich object and see if the issue is unique to IE or not.

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

Hmm... any suggestions for "another graphically rich object"? Cus I barely know my way around the IE stuff, nevermind finding another one. Sorry. :)

ptrex will get you started here with Adobe Acrobat Reader: #143407

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

It did that to me, just let the animation effect start, sleep for maybe a second, then let it navigate to the page. It should work after that.

Unfortunately that defeats my entire purpose. I want the content visible as the window slides in. :\

ptrex will get you started here with Adobe Acrobat Reader: #143407

Dale

Thanks, I will look into this.

*Edit: Wow that thread is old, unfortunately his example isn't working properly, I'll have to fudge around with it. You wouldn't happen to know of anything else I could try in case I can't figure this out, would you? (Sorry to be such a nag :))

Edited by Saunders
Link to comment
Share on other sites

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

  • 5 years later...

6 year old thread.

Nice work.

 

Zombie threads appear more often now - what a conincidence.

"Just be fred, all we gotta do, just be fred."  -Vocaliod

"That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha

@tabhooked

Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...