Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / How to use  com and objects to get LocationUrl

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. How to use  com and objects to get LocationUrl
#4646
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 http://www.diakin.narod.ru/RQDP/faq/ole.html , 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.Clear
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
Next
Message2. Re: How to use  com and objects to get LocationUrl
#4664
Posted by: erdemaal 2004-06-28 22:24:28
There is an example on this site at :

http://g.yi.org/f.php?f=7693

the property .refresh works too

Jacques
Message3. Re: How to use  com and objects to get LocationUrl
#4702
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
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2017-11-22  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0