zeroman Posted April 14, 2009 Share Posted April 14, 2009 (edited) 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 April 14, 2009 by zeroman Link to comment Share on other sites More sharing options...
Mat Posted April 14, 2009 Share Posted April 14, 2009 I suppose you could use a loop to test winnotactive, rather than try to trigger an event. do ;;; until WinActive ("Title") = 0 WinActivate ("Title2") AutoIt Project Listing Link to comment Share on other sites More sharing options...
zeroman Posted April 14, 2009 Author Share Posted April 14, 2009 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now