Jump to content

How do you close an IE tab that is still loading?


Herb191
 Share

Recommended Posts

When a website is taking a long time to load I would like to be able to close the tab it is in without waiting for it to finish loading.

I have been testing this code with no luck.

#include <IE.au3>
$oIE = _IECreate("www.autoitscript.com")
For $i = 1 To 5 Step 1
$oIE.Navigate2("www.msn.com", 2048)
Next
;try to close all tabs but the first tab
$i = 1
While 1
$i = $i + 1
$oIE2 = _IEAttach("", "instance", $i)
If @error = $_IEStatus_NoMatch Then ExitLoop
_IEQuit($oIE2)
WEnd
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

×
×
  • Create New...