FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To clean up the files from HTML code
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
To clean up the files from HTML code
Posted: Tue Feb 13, 2007 02:43 PM

Hi fwh's,

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

Ciao, best regards,

Ugo
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
To clean up the files from HTML code
Posted: Tue Feb 13, 2007 04:09 PM
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.
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
To clean up the files from HTML code
Posted: Tue Feb 13, 2007 06:09 PM
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.
Ciao, best regards,

Ugo
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
To clean up the files from HTML code
Posted: Tue Feb 13, 2007 06:22 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
To clean up the files from HTML code
Posted: Tue Feb 13, 2007 06:40 PM
Try this:

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
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
To clean up the files from HTML code
Posted: Wed Feb 14, 2007 07:47 AM
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.
Ciao, best regards,

Ugo
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
To clean up the files from HTML code
Posted: Wed Feb 14, 2007 07:53 AM
EnricoMaria wrote:Try this:

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! :-)

Many thanks.
Ciao, best regards,

Ugo
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
To clean up the files from HTML code
Posted: Sat Nov 03, 2007 05:34 PM
EnricoMaria wrote:Try this:

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?
Ciao, best regards,

Ugo
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
To clean up the files from HTML code
Posted: Sat Nov 03, 2007 07:59 PM

A bug on Vista?

EMG

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
To clean up the files from HTML code
Posted: Sat Nov 03, 2007 08:05 PM

Have you tried to run the program as Administrator?

Posts: 97
Joined: Sun Nov 20, 2005 04:32 PM
Re: To clean up the files from HTML code
Posted: Sat Nov 03, 2007 11:23 PM
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
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
To clean up the files from HTML code
Posted: Mon Nov 05, 2007 09:04 AM
EnricoMaria wrote:A bug on Vista?

or IE7 Bug?
Ciao, best regards,

Ugo
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
To clean up the files from HTML code
Posted: Mon Nov 05, 2007 09:06 AM
Otto wrote:Have you tried to run the program as Administrator?

Otto,
Yes, i'm administrator of my computer :-)
Ciao, best regards,

Ugo
Posts: 283
Joined: Sat Oct 15, 2005 06:40 AM
Re: To clean up the files from HTML code
Posted: Mon Nov 05, 2007 09:08 AM
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!
Ciao, best regards,

Ugo
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
To clean up the files from HTML code
Posted: Mon Nov 05, 2007 09:30 AM
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

Continue the discussion