Sign in to follow this  
Followers 0
logmein

Help about read url from firefox, opera and chrome!

2 posts in this topic

#1 ·  Posted (edited)

Hi,

This is my script :

Func checklink ()
    Local $b_title[4] = ['Google Chrome','Internet Explorer','Opera','Mozilla Firefox']
    For $z = 1 to 3
    $winlist = WinList ($b_title[$z])
    
        For $i  = 1 To $winlist[0][0]
            Local $realurl = ''
            
            If StringInStr ($winlist[$i][0],'Microsoft Internet Explorer') <> 0 Then
                $url = ControlGetText ($winlist[$i][0],'','Edit1')
            ElseIf StringInStr ($winlist[$i][0],'Google Chrome') <> 0 Then
                $url = ControlGetText ($winlist[$i][0],'','Chrome_AutocompleteEditView1')
            ElseIf StringInStr ($winlist[$i][0],'Opera') <> 0 Then
                $url = ControlGetText ($winlist[$i][0],'','OperaWindowClass7')
            Else
                $url = ControlGetText ($winlist[$I][0],'','MozillaWindowClass1')
            EndIf
            
            MsgBox (64,$winlist[$i][0],'url : ' & $url)
            If StringLeft ($url,7) = 'http://' Then
                $left1 = StringTrimLeft ($url,7)
            Else
                $left1 = $url
            EndIf
            If StringLeft ($left1,4) = 'www.' Then
                $left2 = StringTrimLeft ($left1,4)
            Else
                $left2 = $left1
            EndIf
            
            $replace = StringInStr ($left2,'/',0,1)
            $realurl = StringLeft ($left2,$replace-1)
            $ini = IniRead ($dbpath,'Database',$realurl,'ok')
next
next

Why the script can't read url from tab(s) of chrome, firefox and opera (except ie) ?

Note : don't use Ctrl + L then copy

Edit1 : Can I use _IEPropertyGet ?

Edited by logmein

Share this post


Link to post
Share on other sites



Because Firefox/Opera/Chrome don't use standard Windows Controls.


Share this post


Link to post
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
Sign in to follow this  
Followers 0