To clean up the files from HTML code

To clean up the files from HTML code

Postby Ugo » Tue Feb 13, 2007 2:43 pm

Hi fwh's,

to clean up the files from HTML code,
exists some function?
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Rochinha » Tue Feb 13, 2007 4: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.
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Ugo » Tue Feb 13, 2007 6: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
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby James Bott » Tue Feb 13, 2007 6: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Enrico Maria Giordano » Tue Feb 13, 2007 6:40 pm

Try this:

Code: Select all  Expand view
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
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Ugo » Wed Feb 14, 2007 7: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
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Ugo » Wed Feb 14, 2007 7:53 am

EnricoMaria wrote:Try this:

Code: Select all  Expand view
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

Postby Ugo » Sat Nov 03, 2007 5:34 pm

EnricoMaria wrote:Try this:

Code: Select all  Expand view
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
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Enrico Maria Giordano » Sat Nov 03, 2007 7:59 pm

A bug on Vista?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Otto » Sat Nov 03, 2007 8:05 pm

Have you tried to run the program as Administrator?
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Re: To clean up the files from HTML code

Postby NK » 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
User avatar
NK
 
Posts: 97
Joined: Sun Nov 20, 2005 4:32 pm
Location: Germany

Postby Ugo » Mon Nov 05, 2007 9:04 am

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

Postby Ugo » Mon Nov 05, 2007 9:06 am

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

Postby Ugo » Mon Nov 05, 2007 9: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
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Enrico Maria Giordano » Mon Nov 05, 2007 9: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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 60 guests