Jump to content

Closing and opening two IEs


Recommended Posts

I wanna switching between two web site (http://loacalhost/tes1.htm AND http://localhost/test2.htm). Only one web site could be shown in the same time.

For example, test1.htm shown, after it closes, test2 shows up.

after test2 closed, test1 shows up.

Can I do this ?

I cant do it in a loop

#include <IE.au3>
$IE1 = _IECreate("http://localhost/test1.htm")
_IELoadWait($IE1)

If WinExists("test1 title") Then
;;
Else
$IE2 = _IECreate("http://localhost/test2.htm")
_IELoadWait($IE2)
Endif

If WinExists("test2 title") Then
;;
Else
$IE1 = _IECreate("http://localhost/test1.htm")
_IELoadWait($IE1)
Endif
Edited by zeroman
Link to comment
Share on other sites

I suppose you could use a loop to test winnotactive, rather than try to trigger an event.

do
;;;
until WinActive ("Title") = 0
WinActivate ("Title2")
I'm sorry that I cannot catch the activation of test1.htm

#include <IE.au3>
$IE1 = _IECreate("http://localhost/test1.htm")
_IELoadWait($IE1)

Do
;;
Until WinActive("test1 title - Internet Explorer") = 0

$IE2 = _IECreate("http://localhost/test2.htm")
_IELoadWait($IE2)
WinActivate ("test2 title - Internet Explorer")
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...