Followers 0

# 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 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.

- 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

Thanks,

Dale

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

Automate input type=file (Related)

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 on other sites

_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

Automate input type=file (Related)

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