To clean up the files from HTML code

Post Reply
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

To clean up the files from HTML code

Post by Ugo »

Hi fwh's,

to clean up the files from HTML code,
exists some function?
Ciao, best regards,
Ugo
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post 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.
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post 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.
Ciao, best regards,
Ugo
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post 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
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post 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.
Ciao, best regards,
Ugo
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post 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.
Ciao, best regards,
Ugo
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post 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?
Ciao, best regards,
Ugo
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Have you tried to run the program as Administrator?
User avatar
NK
Posts: 97
Joined: Sun Nov 20, 2005 4:32 pm
Location: Germany
Contact:

Re: To clean up the files from HTML code

Post 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
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post by Ugo »

EnricoMaria wrote:A bug on Vista?
or IE7 Bug?
Ciao, best regards,
Ugo
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post by Ugo »

Otto wrote:Have you tried to run the program as Administrator?
Otto,
Yes, i'm administrator of my computer :wink:
Ciao, best regards,
Ugo
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Re: To clean up the files from HTML code

Post 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!
Ciao, best regards,
Ugo
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post 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
Post Reply