Jump to content
Sign in to follow this  
Dethredic

Mutiple IE Windows

Recommended Posts

Dethredic

I am using the _IE commands to automate a window ($x for this example) , but one of the links I need to click opens a new window (window $y for this example). At this point I no longer need window $x, and all my work will be done in window $y. So, knowing only window $y's title, how can I start controlling it with the _IE commands. Both window $x and window $y will remain hidden during my script.

So I used a winclose on window $x, but how can I start controlling window $y?


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites
SmOke_N

I am using the _IE commands to automate a window ($x for this example) , but one of the links I need to click opens a new window (window $y for this example). At this point I no longer need window $x, and all my work will be done in window $y. So, knowing only window $y's title, how can I start controlling it with the _IE commands. Both window $x and window $y will remain hidden during my script.

So I used a winclose on window $x, but how can I start controlling window $y?

_IEQuit($x)

$x = _IEAttatch($y)


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Dethredic

Hmm, can't get it to work, here is my code

#include <IE.au3>

Dim $title = "Armed Hosting - Live Support Solution (Powered By Help Center Live) - Microsoft Internet Explorer" 
Dim $title2 = "http://armedhosting.com - Armed Hosting - Live Support Solution (Powered By Help Center Live) - Microsoft Internet Explorer" 

$oIE = _IECreate($url, 0, 0, 1, -1)
_IELinkClickByText($oIE, "Live Help"); Open Manager Pane - I want to control this
_IELoadWait($oIE)
_IEQuit($oIE)
$oIE = _IEAttach($title2)
_IELinkClickByText($oIE, "[Offline]"); This does not work
_IELoadWait($oIE)

EDIT: The error returned is 7, so that means it wasn't found, but the title is right

Edited by Dethredic

"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites
SmOke_N

Why would you use _IELoadWait()?

Try to replace:

_IELoadWait($oIE)
_IEQuit($oIE)

With:

_IEQuit($oIE)
WinWait($title2)
Is Title 2 what you want there?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Dethredic

well, it still doesn't work.


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites
DaleHohm

Document title and window title are not the same thing. The document title that _IEAttach uses by default is what is set in the <TITLE> tag in HTML. You also have the choice of using WindowTitle with an option parameter to _IEAttach.

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  

×