09-17-2008, 06:01 PM
Hi,
i have created a function to open a browser, but i don't understand one thing. Here the code:
I use a program to modify host files, because I have different test environments, but when i launch this function the opend browser has always the same host...
[if i write a similar function using SystemUtil.Run "iexplore" i have not this problem].
Can somebody explain me this behaviour?
thanx a lot
i have created a function to open a browser, but i don't understand one thing. Here the code:
Code:
Function FunOpenBrowser()
dim objexpl, brow, pag, hwnd(1)
set objexpl = CreateObject("InternetExplorer.Application")
objexpl.visible = true
objexpl.navigate "http://www.vodafone.it"
wait(5)
Set brow = Browser("hwnd:=" & objexpl.hwnd)
Set pag = brow.Page("title:=" & objexpl.Document.Title)
pag.Sync
hwnd(0) = brow.getroproperty("hwnd")
hwnd(1) = pag.getroproperty("hwnd")
FunOpenBrowser = hwnd
End Function
I use a program to modify host files, because I have different test environments, but when i launch this function the opend browser has always the same host...
[if i write a similar function using SystemUtil.Run "iexplore" i have not this problem].
Can somebody explain me this behaviour?
thanx a lot