Sign in to follow this  
Followers 0
Coldburn

Error with _IEAttach

3 posts in this topic

I'm having trouble getting the _IEAttach function to work. Keep getting an error even from the example code;

$oIE = _IEAttach("AutoIt")
If Not IsObj($oIE) Then
    $oIE = _IECreate("www.autoitscript.com")
EndIf

>Running:(3.1.1.130):C:\Program Files\AutoIt3\beta\autoit3.exe < truncated >
C:\Program Files\AutoIt3\beta\Include\IE.au3 (503) : ==> The requested action with this object has failed.: 
If StringInStr($o_window.document.title, $s_string) > 0 Then 
If StringInStr($o_window.document.title^ ERROR
+>AutoIT3.exe ended.rc:0

What am I doing wrong?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I'm having trouble getting the _IEAttach function to work. Keep getting an error even from the example code;

$oIE = _IEAttach("AutoIt")
If Not IsObj($oIE) Then
    $oIE = _IECreate("www.autoitscript.com")
EndIf

>Running:(3.1.1.130):C:\Program Files\AutoIt3\beta\autoit3.exe < truncated >
C:\Program Files\AutoIt3\beta\Include\IE.au3 (503) : ==> The requested action with this object has failed.: 
If StringInStr($o_window.document.title, $s_string) > 0 Then 
If StringInStr($o_window.document.title^ ERROR
+>AutoIT3.exe ended.rc:0

What am I doing wrong?

_IEAttach examines all IE browser and file explorers running in your account.

There are two things I can think of that can cause a problem like this.

1) you have a browser or file explorer on your system in a hung or unresponsive state.

2) you have a custom browser or file explorer running in your account with unexpected properties. By unexpected properties I mean that it has a browser control ("Internet Explorer_Server1") that has no document object.

Please:

- make note of all of the applications you are running (in light 2) above)

- get out of all browsers and file explorer windows

- use the task manager to look for an kill any remaining (zombie) iexplore.exe processes

- retest your script multiple times

- if it fails, try logging off/rebooting and retest

- if it works, try adding back things you had running before and retest to see if you can reproduce

- report your results here

Thanks,

Dale

Edit: added another debug step

Edited by DaleHohm

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

Also, adding the line:

_IEErrorHandlerRegister()
to your script before the error will give use some potentially useful messages to the console and will also allow your script to continue past the error (essentially giving you a workaround to the problem).

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

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