Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / sbjct: How to view the source code.........

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. sbjct: How to view the source code.........
#4012
Posted by: derty_3 2004-05-04 04:50:31
i'm  newbie in rapid-q or in programming in general.....
but could somebody tell me how to view the source code of an html page based
on this very good programm:

-- RapidQ / examples / COM & OLE / Internet Projects /   IEE1.bas

the point is :how to paste the source code of an opened web page to a

richedit box by activating a button for example

  it works with:

 CreateObject("DHTMLEdit.DHTMLEdit.1")
dhtm.SaveDocument SaveDialog.FileName, True   '  ..... works


but i would like to do the same thing with:

      dhtm.CreateObject("Shell.Explorer.1") '  wrote in IEE1.bas

and then be abble to paste the source code text  to a richedit box.....;



i look forward to a reply,it will be usefull to many rapid-q users too i think;:)

thanks to advanced programmers out there!!


derty_3
Message2. Re: sbjct: How to view the source code.........
#4049
Posted by: erdemaal 2004-05-06 19:47:15 Last edited by: guidance 2006-12-22 13:00:44 (Total edited 1 time)
A newbie ??? Are you sure ?

>  it works with:
> CreateObject("DHTMLEdit.DHTMLEdit.1")
>dhtm.SaveDocument SaveDialog.FileName, True   '  ..... > works
I am very interested by this DHTLMLEdit ... I always failed tryinng to save the document with Explorer OleObject. As soon as I get sometime, I'll try it.

For createObject("Shell.Explorer.1"), I wrote yesterday in the RQ Yahoo Group :
--------
There is an example of what is possible with IExplorer as an OLEOBJECT in RapidQ

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

To the list you can add     OleIE.Refresh
--------

To get the html source of the page you can download it in another way :

'
' ====================================================
' GetFileHTTP       FUNCTION          January 2002         By Jacques Philippe
'
' DOCUMENTATION  &  CODE
' ====================================================
'
'    Grab a File On a WebSite   many extensions accepted, but not all !
'
'    .htm, .html, .zip, .jpg, .gif, ...   ???
'
' $Include "Functions\GetFileHTTP.Inc"
' -------
' Example :
' -------
'     If GetFileHTTP ("http://www.basicguru.com/rqgtklib.zip", "c:\\temp\\rqgtklib.zip") Then
'         Print "Download Error"
'     Else
'         Print "Download Finished & OK"
'     End If   
'
' ====================================================
' CODE
' ----
'
    Declare Function FGetFileHTTP_URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
            (ByVal pCaller As Long, ByRef szURL As String, ByRef szFileName As String, _
             ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
'
    Function GetFileHTTP (URL As String, toFile As String) As Long
        DefStr sURL, sToFile
        sURL = URL
        sToFile = toFile
        GetFileHTTP = FgetFileHTTP_URLDownloadToFile (0, sURL, sToFile, 0, 0)
    End Function
'
'

Jacques
Message3. Re: sbjct: How to view the source code.........
#4081
Posted by: derty_3 2004-05-09 02:56:59
hello,

many thanks for your reply.......

I just downloaded Rapid-q 3 months ago...at the time i didn't know that i could
program simple programs of my own.......:)

the link you gave me was just the example i used to navigate with I.E.  ..it works fine.....

i'm glad to know that you're interested by the same project..and thanks for contributing..

for viewing the source with gethttp,i also already used it ,and it works fine too...

i used it with an "weather checker" application  to download a url of a given
city code......but it takes about 20s for downloading  whole page with only few lines interesting in it....

there was another way to retrieve weather forecasts is to contact a site with

a given city code and then the site returns back and generates a xml file

by this method it takes about 5s only to retrieve..


that's why i'm interested of viewing source in adding of your internet explorer

embeded example......

sincerely  , derty_3
Message4. Re: sbjct: How to view the source code.........
#4082
Posted by: guidance 2004-05-09 13:26:19
there was another way to retrieve weather forecasts is to contact a site with a given city code ...

Could you tell how you "give" the city code? By query_string (get) or post method?
Message5. Re: sbjct: How to view the source code.........
#4092
Posted by: derty_3 2004-05-10 20:07:38
Reply to guidance:

I think it's a post method but here you are an example:

the city code is GMXX0007 (btw:berlin)
you have to write the url by your own with a special code:

unit=m:for celsius
dayf:one day forecast....others are hourly ,3,5 days and so on.....
and many others options described on the site
so you have:


http://xoap.weather.com/weather/local/GMXX0007?cc=*&dayf=2&unit=m

enter it with I.E  and almost instantly the forecasts are displayed
in xml format..
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥1,800.00 ·
 
 
¥489.00 ·
 
 
¥288.00 ·
 
 
¥908.00 ·
 
 
¥748.00 ·
 
 
¥264.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0