Welcome, Guest. Please login or register.
Login with username, password and session length

 
Advanced search

18120 Posts in 4741 Topics- by 31743 Members - Latest Member: suuraj
 

Pages: [1]   Go Down
Print
0 Members and 1 Guest are viewing this topic.
Author Topic: Close 2nd browser    (Read 615 times)
niranjan deka
FRProject
Full User
*
Offline Offline

Posts: 226


« on: October 06, 2009, 12:52:51 AM »

Hi all,

In my application, when i click on a link, it will open up in a new browser, now i want to close the new open up browser, but lost how to do that because i have only one instances of original browser ($oIECreate) and therefore using _IEQuit ($oIE) will only clos the original and not the new one browser. Please let me know if anyone faces the same problem with the browser multiple instances.Huh?

Regards
Niranjan
Logged
Meir Bar-Tal
Administrator
Advanced User
*****
Offline Offline

Posts: 1283



WWW
« Reply #1 on: October 06, 2009, 06:49:34 AM »

Code
GeSHi (autoit):
$newIE = _IEAttach("<New Title>")

$newIE.quit

 
Created by GeSHI 1.0.7.20
Logged

Best Regards,

Meir Bar-Tal
AdvancedQTP Chief Editor & Forums Administrator
niranjan deka
FRProject
Full User
*
Offline Offline

Posts: 226


« Reply #2 on: October 06, 2009, 11:00:33 PM »

Hi Meir,

Thanks once again for your time towards helping me out.I do hope that this will help other also. Yep now it is working fine now but i have to use '_IEQuit($newIE)' instead of '$newIE.quit' to close the 2nd browser.

regards
Niranjan
Logged
Meir Bar-Tal
Administrator
Advanced User
*****
Offline Offline

Posts: 1283



WWW
« Reply #3 on: October 07, 2009, 01:35:35 AM »

Quit should work also, just that perhaps the _IEAttach function should be used as follows:

Code
GeSHi (autoit):


#include <IE.au3>

$oIE1 = _IECreate ("www.autoitscript.com")

$oIE2 = _IEAttach($oIE1.hwnd, "HWND")

$oIE2.quit

$oIE1 = 0

$oIE2 = 0



 
Created by GeSHI 1.0.7.20
Logged

Best Regards,

Meir Bar-Tal
AdvancedQTP Chief Editor & Forums Administrator
Pages: [1]   Go Up
Print
Jump to: