Jump to content
Sign in to follow this  
Leagnus

ie.au3 IEAttach bug

Recommended Posts

Leagnus

When I try simple code

#include <IE.au3>

$o_IE=_IEAttach("http://www.google.com","url")

with existing MSIE and http://www.google.com opened - I took the error

Line 284 (File "C:\program files\autoit3\Include\IE.au3"):

Local $o_ShellWindows = $o_Shell.Windows ()

Local $o_ShellWindows = $o_Shell.Windows ()^ ERROR

Error: The requested action with this object has failed.

WinXP SP2 Rus

AutoIt3 3.2.3.14

-//- beta 3.2.3.6

Share this post


Link to post
Share on other sites
nobbe

hi you need to init an IE object first

#include <IE.au3>

$oIE = _IECreate ("www.autoitscript.com", 1)

; Check @extended return value to see if attach was successful

If @extended Then

MsgBox(0, "", "Attached to Existing Browser")

Else

MsgBox(0, "", "Created New Browser")

EndIf

$url = "http://www.google.com";

_IENavigate($oIE, $url) ;;

_IELoadWait($oIE)

Share this post


Link to post
Share on other sites
Leagnus

I wanna not to create but attach to existing

after I login into a password-protected page

Share this post


Link to post
Share on other sites
someone

Try this code,

#include <IE.au3> 
$oIE = _IEAttach("http://www.google.com", "URL")
MsgBox(0, "The URL", _IEPropertyGet ($oIE, "locationurl"))

_IENavigate($oIE, "http://www.autoitscript.com/forum/index.php?showtopic=47721")

That will take an exsisting google.com ie and navigate it to this page.

Let us know if you have trouble.

EDIT - Should have said I'm using ver 3.2.4.4

Edited by someone

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites
DaleHohm

Does this always happen? Just once? Please try with no other programs running, try logging out or rebooting. If it is reproducible, please report back with more detail.

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
Leagnus

Eah, it happens always

CODE
#include <IE.au3>

$oIE = _IEAttach("http://www.google.com", "URL")

MsgBox(0, "The URL", _IEPropertyGet ($oIE, "locationurl"))

_IENavigate($oIE, "http://www.autoitscript.com/forum/index.php?showtopic=47721")

shows me

CODE
Line 305 (File "C:\Program Files\AutoIt3\Include\IE.au3"):

Local $o_ShellWindows = $o_Shell.Windows ()

Local $o_ShellWindows = $o_Shell.Windows ()^ ERROR

Error: The requested action with this object has failed.

with existing MSIE on google

and autoIt 3.2.4.9

:rolleyes:

Edited by Leony

Share this post


Link to post
Share on other sites
DaleHohm

Did you try logging out/rebooting as I asked? Sometimes a misbehaving iexplore.exe process can cause something like this and must be cleared.

The $o_Shell.Windows collection contains both IE instances and file explorer instances. Are you running anything non-standard that might be involved? Please try to isolate if so.

You imply that this only occurs if you have a browser open to Google -- is this so or do I misunderstand your description?

Also, I'd expect that only the first 2 lines of your example are required to reproduce the issue right?

Dale

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
Leagnus

Wow! I'm working under PowerPro as shell

And when I've turned IE as shell - I've got "0" MsgBox!!!!

:rolleyes:

Share this post


Link to post
Share on other sites
DaleHohm

Can you provide a link to PowerPro? I've tried to trap errors like this and allow _IEAttach to skip over these shells and I'd like to investigate further. You can probaly avoid having your script abort by placing _IEErrorHandlerRegister() after your #include.

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
DaleHohm

Also, please be certain that you are not in fact including an old version of IE.au3 where this was a common issue.

_IE_VersionInfo()

will show you the IE.au3 version and release date to the console.

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
DaleHohm

Also, please be certain that you are not in fact including an old version of IE.au3 where this was a common issue.

_IE_VersionInfo()

will show you the IE.au3 version and release date to the console.

Dale

Can you provide this information as well please?

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
DaleHohm

Leony,

I checked line 284 where your error occurred and found that it does not match V2.2-1 (the currect release). I looked back in my CVS and found that it DOES match in IE.au3 V2.1-0 released 12/16/06.

This issue has been addressed in current versions, so please figure out where you have the old version on your disk and get rid of it (perhaps in a beta\include folder ?).

Please insure you include the current IE.au3 version and your trouble should disappear.

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
Leagnus

I'm convinced of need to use ObjCreate("Shell.Explorer.2") in alternative shell environment.

In the environment it's the only way to _IEAttach (recurrent use of existent IE object).

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  

×