Sign in to follow this  
Followers 0
Starbug

Potential Bug with OBJEVENT

6 posts in this topic

When using DWebBrowserEvents2 Interface, Autoit with crash (with a windows error) when attempting to Right Click >> Open in new Window

DWebBrowserEvents Interface works Fine. see the below Code

USING DWebBrowserEvents Interface - $IE1 = the google Web Box

This will work fine

#include <GUIConstants.au3>
$IE1 = ObjCreate("Shell.Explorer.2")
$IE2 = ObjCreate("Shell.Explorer.2")

Opt("GUIOnEventMode", 1)
Form=
$Form2 = GUICreate("Form2", 908, 523, 195, 157, BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_CLIPCHILDREN,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetOnEvent($GUI_EVENT_CLOSE, "Form2Close")
$IE1_GUI = GUICtrlCreateObj($IE1, 8, 8, 452, 508)
$IE2_GUI = GUICtrlCreateObj($IE2, 464, 8, 436, 508)
GUISetState(@SW_SHOW)

$IE1.navigate2("http://www.google.com.au")
$IE2.navigate2("http://www.yahoo.com/")

$EventObject = ObjEvent($IE1, "IEEvent_", "DWebBrowserEvents")

While 1
    Sleep(100)
WEnd

Func Form2Close()
Exit
EndFunc

Func IEEvent_($var1, $var2, $var3, $var4)
    
EndFunc

NOW Substitue the above code to use DWebBrowserEvents2 Interface [$EventObject = ObjEvent($IE1, "IEEvent_", "DWebBrowserEvents2")]

This will FAIL when you right click and select open in new window

According to MSDN both Inherits from IDispatch, but DWebBrowserEvents = """""This interface is obsolete; use the DWebBrowserEvents2 interface instead. The DWebBrowserEvents2 interface provides more control over the WebBrowser control than the DWebBrowserEvents interface."""""

I have tested this on about 5 PC's here at work and all failed, BUT these PC's all have the same setup. (XP SP2 + IE6)

Can i please get somebody to test this on a different setup and Confirm / deny if this is a Bug

When using DWebBrowserEvents2, i am still receiving all events OK, just the problem with right clicking.

Thanx to all who help

Starbug

Share this post


Link to post
Share on other sites



Bumping with more information

Attached is a screen shot of the error for anybody that understands them.

in the error, it shows autoit3.exe as the problem, but this is only because it was run from scite. if a compiled version is run, the error is the filename (as expected)

details from scite --

>Running AU3Check (1.54.10.0) from:E:\Autoit

+>15:25:22 AU3Check ended.rc:0

>Running:(3.2.10.0):E:\Autoit\autoit3.exe "E:\BB LT Combined\test code only5.au3"

!>15:29:25 AutoIT3.exe ended.rc:-1073741819

>Exit code: -1073741819 Time: 245.851

Hoping somebody can help here.

Starbug

post-27409-1206419542_thumb.jpg

Share this post


Link to post
Share on other sites

bumping again.

hopefully somebody will see this who can help now that the holiday period is over

Share this post


Link to post
Share on other sites

Not sure if this is a reicarnation of the issue you point or not. If it is causing an AutoIt crash, there is certainly a bug. I do suggest that you look at the topic related to the one that ResNellius mentioned to see how the issue was characterized and reported: http://www.autoitscript.com/forum/index.ph...=17685&st=0

The issue needs to be characterized and logged to the Bug Trac'r (see link at top of every forum page).

Before you do this however, please download and test with the latest beta.

Dale

p.s. _IECreateEbmedded is simply a wrapper around the Shell.Explorer object, so no help there


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

Share this post


Link to post
Share on other sites

p.s. _IECreateEbmedded is simply a wrapper around the Shell.Explorer object, so no help there

When I run the _IECreateEmbeded example from the helpfile, I don't get any crash on the "right click and select open in new window". Script runs as expected and spawns a new instance.

I guess it's in only in using the DWebBrowserEvents(2) that the problem occurs, as the OP stated...

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