Page 1 of 1

To clean up the files from HTML code

Posted: Tue Feb 13, 2007 2:43 pm
by Ugo
Hi fwh's,

to clean up the files from HTML code,
exists some function?

Posted: Tue Feb 13, 2007 4:09 pm
by Rochinha
Friend

I recomend to you ASP. Use the FSO object to manipulate files on server.

Here some examples with this functions:

Web Explorer
FileMan. The best.

Posted: Tue Feb 13, 2007 6:09 pm
by Ugo
Rochinha wrote:Friend

I recomend to you ASP. Use the FSO object to manipulate files on server.

Here some examples with this functions:

Web Explorer
FileMan. The best.
Rochinha,
thank you for your answer.

I am searching one simple function in order to remove the code from HTML files directly from xHarbour - Fivewin.

Posted: Tue Feb 13, 2007 6:22 pm
by James Bott
Ugo,

Perhaps you can use IE and OLE.

http://msdn.microsoft.com/library/defau ... plorer.asp

There is a command to "selectall" and another for "removeformat." So, you could open IE and load the HTML file, then use these commands, then copy to the clipboard, then paste from the clipboard (using FWH) and save to a file.

James

Posted: Tue Feb 13, 2007 6:40 pm
by Enrico Maria Giordano
Try this:

Code: Select all

FUNCTION MAIN()

    LOCAL oExplorer := CREATEOBJECT( "InternetExplorer.Application" )

    oExplorer:Navigate2( "www.emagsoftware.it/gratis.htm" )

    WHILE oExplorer:ReadyState <> 4
        HB_IDLESLEEP( 1 )
    ENDDO

    ? oExplorer:Document:Body:InnerText

    oExplorer:Quit()

    INKEY( 0 )

    RETURN NIL
EMG

Posted: Wed Feb 14, 2007 7:47 am
by Ugo
James Bott wrote:Ugo,

Perhaps you can use IE and OLE.

http://msdn.microsoft.com/library/defau ... plorer.asp

There is a command to "selectall" and another for "removeformat." So, you could open IE and load the HTML file, then use these commands, then copy to the clipboard, then paste from the clipboard (using FWH) and save to a file.
Dear James,
this solution is interesting, tries it!
Thanks.

Posted: Wed Feb 14, 2007 7:53 am
by Ugo
EnricoMaria wrote:Try this:

Code: Select all

FUNCTION MAIN()

    LOCAL oExplorer := CREATEOBJECT( "InternetExplorer.Application" )

    oExplorer:Navigate2( "www.emagsoftware.it/gratis.htm" )

    WHILE oExplorer:ReadyState <> 4
        HB_IDLESLEEP( 1 )
    ENDDO

    ? oExplorer:Document:Body:InnerText

    oExplorer:Quit()

    INKEY( 0 )

    RETURN NIL
Enrico,
it is perfect! :D

Many thanks.

Posted: Sat Nov 03, 2007 5:34 pm
by Ugo
EnricoMaria wrote:Try this:

Code: Select all

FUNCTION MAIN()

    LOCAL oExplorer := CREATEOBJECT( "InternetExplorer.Application" )

    oExplorer:Navigate2( "www.emagsoftware.it/gratis.htm" )

    WHILE oExplorer:ReadyState <> 4
        HB_IDLESLEEP( 1 )
    ENDDO

    ? oExplorer:Document:Body:InnerText

    oExplorer:Quit()

    INKEY( 0 )

    RETURN NIL
EMG
Dear Enrico,
this function on Vista Business and IE7 return this error:
"Error InternetExplorer.Application/1722 Unknown error: READYSTATE"
i do not know on ther O.S. :?
can you confirm and help me to fix?

Posted: Sat Nov 03, 2007 7:59 pm
by Enrico Maria Giordano
A bug on Vista?

EMG

Posted: Sat Nov 03, 2007 8:05 pm
by Otto
Have you tried to run the program as Administrator?

Re: To clean up the files from HTML code

Posted: Sat Nov 03, 2007 11:23 pm
by NK
Ugo wrote:Hi fwh's,

to clean up the files from HTML code,
exists some function?
look at this tool:

http://www.baccan.it/opensource/html2txt201.zip

Regards, Norbert

Posted: Mon Nov 05, 2007 9:04 am
by Ugo
EnricoMaria wrote:A bug on Vista?
or IE7 Bug?

Posted: Mon Nov 05, 2007 9:06 am
by Ugo
Otto wrote:Have you tried to run the program as Administrator?
Otto,
Yes, i'm administrator of my computer :wink:

Re: To clean up the files from HTML code

Posted: Mon Nov 05, 2007 9:08 am
by Ugo
NK wrote: look at this tool:

http://www.baccan.it/opensource/html2txt201.zip

Regards, Norbert
Norbert,
thanks but the problem now is to receive the html page!

Posted: Mon Nov 05, 2007 9:30 am
by Enrico Maria Giordano
Ugo wrote:
EnricoMaria wrote:A bug on Vista?
or IE7 Bug?
Doesn't seem so. I'm also using IE7 (Windows XP) and not having that problem.

EMG