Jump to content

Problem with detected opened Web page.


Recommended Posts

Hi,

I would like to know if it is possible to make a script that detect opened page so it will not open 2 same browser at a time.

I tried this but it did not work!

while 1
    If Not WinExists("Results - Windows Internet Explorer") Then
        $oIE = _IECreate($URL)
    Else
        $oIE = _IEAttach($URL,"url")
    EndIf

wend

the problem is, i try to open 5 different Web page (WITH different URL) but all of them have a same title : "Results - Windows Internet Explorer"

how to detect URL1 only if its opened or not?

 

thx

Edited by Tripoz
Link to comment
Share on other sites

#include <IE.au3>
$oIE = False
$sURL = "www.autoit.com/"
while 1
    If Not(IsObj($oIE)) Then
        $oIE = _IEAttach($sURL,"url")
        If @error Then
            $oIE = _IECreate($sURL)
            If @error Then
                ConsoleWrite(@CRLF & "error")
            EndIf
        EndIf
    EndIf
    ConsoleWrite(@CRLF & $oIE.Document.Title)
wend

Does this work?

Link to comment
Share on other sites

#include <IE.au3>
$oIE = False
$sURL = "www.autoit.com/"
while 1
    If Not(IsObj($oIE)) Then
        $oIE = _IEAttach($sURL,"url")
        If @error Then
            $oIE = _IECreate($sURL)
            If @error Then
                ConsoleWrite(@CRLF & "error")
            EndIf
        EndIf
    EndIf
    ConsoleWrite(@CRLF & $oIE.Document.Title)
wend

Does this work?

Perfecto bro... thx alot...

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...