Guidance Forums / Rapid-Q Basic / How to use  com and objects to get LocationUrl

Search 搜索
Home Home

Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. How to use  com and objects to get LocationUrl
Posted by: genglish 2004-06-27 10:03:31
Is there any way of doing this in Rapidq to extract the url from a webpage?
I've looked at , downloaded the oleviewer from microsoft site. Below is some code from a vb forum but I do not how to convert it to rapidq.
Thanks to all for comments

From VB forum:
 ' You must add a reference to 'Microsoft Shell Controls And Automation'
 ' %SYSTEM_PATH%\Shell32.dll
Dim objShell32 As New Shell32.Shell
Dim objWindows As Object
Dim lngCounter As Long

Const strPause = "     "

 ' Get collection of open folder windows
Set objWindows = objShell32.Windows

 ' Prepare list box
List1.AddItem "Explorer windows count =  " & objWindows.Count

 ' Iterate thru all objects if present
For Each objWindows In objShell32.Windows
    List1.AddItem ""
    lngCounter = lngCounter + 1
    List1.AddItem "Number " & lngCounter
    List1.AddItem strPause & "Path = " & objWindows.Path
    List1.AddItem strPause & "Full name = " & objWindows.FullName
    List1.AddItem strPause & "Name = " & objWindows.Name
    List1.AddItem strPause & "hWnd = " & objWindows.hWnd ' Here you have hWnd and you can make this window active
    List1.AddItem strPause & "Location = " & objWindows.LocationName
    List1.AddItem strPause & "URL = " & objWindows.LocationURL ' This is web address you want
    List1.AddItem strPause & "Status text = " & objWindows.StatusText
Message2. Re: How to use  com and objects to get LocationUrl
Posted by: erdemaal 2004-06-28 22:24:28
There is an example on this site at :

the property .refresh works too

Message3. Re: How to use  com and objects to get LocationUrl
Posted by: genglish 2004-07-02 01:56:41
Thanks for pointing me to that one. It's very good. I still need more help on how to 'Get collection of open folder windows'. I've searched high & low but it remains a mystery to me as the example starts a new instance of internet explorer while I want to ' Iterate thru all objects if present'.
Any ideas?
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
© Sat 2018-6-23  Guidance Laboratory Inc. Hits:0