In webbrow.prg to display the text on the website?

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

In webbrow.prg to display the text on the website?

#1 Post by Eugene Lutsenko »

In webbrow.prg or Xb2net to obtain the text displayed on the window, in the value of a variable?

***** Получить текст сайта, используя HTTP (GetWeb.prg, Boris Borzic)
oHttp := xbHTTPClient():new()
oHttp:Transport := VIA_WININET
oResponse := oHttp:Execute( 'http://translate.yandex.ru/?lang=ru-en& ... 0%B8%D1%80!' )
mABC = oResponse:Content
StrFile(mABC, 'WebsiteTranslator.txt')

For some reason the translation is not contained in the received code from the site. A word for translation it is.

How to programmatically get the translated file from a translator online?
Attachments
Безымянный.jpg
Безымянный.jpg (77.72 KiB) Viewed 8884 times

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: In webbrow.prg to display the text on the website?

#2 Post by Eugene Lutsenko »

Hey, Boris!

There is a possibility to programmatically go to the website (I know it's not a problem), and then get in a text file what is displayed on the screen?

=========================================================================

Hi Eugene,

Have a look at the GETWEB.PRG sample included with Xb2.NET - it shows how to download a file from a website.

=========================================================================

Thank You, Boris!

That's what I watched. Here is the problem. When I turn to online translator and look so html text page, it is translatable text, but not translated. And on the screen it is.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: In webbrow.prg to display the text on the website?

#3 Post by c-tec »

Hello,
look at the HTML code, the translator can only find text if it is correct embedded in the HTML code. Otherwise you have to modify the code before translating.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net


Post Reply