Getting a browser url on Windows

Ken Ray kray at sonsothunder.com
Tue Feb 17 16:54:06 EST 2009


> I use Applescript to get the url of the active window in Safari and Firefox
> on a Mac but is there any equivalent (VB?) that would allow me to do the
> same for IE and Firefox under Windows? Or is that a job for an external?

Sorry it took so long for me to respond, Terry, and if you already have an
answer forgive me... but all I have is how to get it from IE with VBScript:

Set objApps = CreateObject("Shell.Application")
For Each objApp in objApps.Windows
    If (objApp.Name = "Windows Internet Explorer") or _
       (objApp.Name = "Microsoft Internet Explorer") Then
        If objApp.LocationURL <> "" Then
            WScript.Echo objApp.LocationURL
        End If
    End If
Next


HTH,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list