Excuse me but I had not seen your last project, now I try it, with all these messages, I went out of my mind, I struggle to follow everything, among my dozens of tests to try not to disturb you and your help, I go haywire thanks now try again.
Well here is another aia project that sends text to the webview and retrieives it.
returnwvs3.aia (4.1 KB)
You have been great, you really deserve every compliment not only from me, but also from whoever created this forum, which I thank.
Timal2, a warm thanks you have solved a huge problem for me and if the App is successful I will not forget any of you.
Excuse me again Timal2, is it possible not to have the text deleted from the textbox when transferring the text?
Yes it is. remove or comment
// this line in the html file:
document.getElementById("textbox").value = '';
Hi Angelo - are you going to tell us why you are using a WebView with a local web page (not on the internet) instead of a simple App Inventor TextBox? What is the reason for sending text to a web page and then retrieving it?
Not being able to have Google voice read only the text of a web page composed of images and more, my idea was to detect the text from the web page and then directly transfer the text from the web page to a textbox, in this case everything would have been easier, but not knowing how to connect from appinventor to the text section contained in the page, (and only to that section), or opted for this solution.
But if you are able to do this directly from the webpage to the texbox without using a text box, that would be super cool and would save you a lot of work.
In a nutshell, if I have a user who creates web pages with block software, then writing and formatting text, also inserting images, without writing a line of code, and wants to send this page, to offer to another user, the option to have the page read by Google voice, the only way, it seemed to me to be, the solution that I had asked Timal2, in fact, is to report this text in a text box.
I tried to experiment but I didn't succeed and then after days of useless tests, I asked for help at the forum and Timal2, it really helped me a lot and in the absence of anything else, I think I found a fantastic and for the moment, better solution possible. Of course I also thank the others who have tried to do so.
Actually connecting to the local page limits me a lot, the best solution as I wrote would be that the user can create his web page, with any software, publish it and then appinventor loads it directly from the web, making it read directly with a button.
That's the explanation you needed to start your Topic with. So:
- Grab text from webpage online
- Run Text - to - Speech on that text
In fact, it is precisely for this reason that I have chosen the solution of writing the text in a text box and then transferring it to the textbox.
This will involve adjusting the text box so that it does not go off the mobile phone display, if viewed on mobile phones with large displays or tablets or TVs. But I will study to solve the problem.
But I would like to add my idea, which will surely come close to the heresy of one who knows html as ignorant on the subject.
But if I create a web page and insert a text, when I publish it, this text within the code will be positioned between some tags (I hope they are called that, the sections that delimit the text in the code therefore being a web page, which I am preparing myself, I know perfectly well that I have to insert only one piece of text and not several, so that text will be between two tags, it is not possible as with web get, to connect to these tags and extract the text?
The 'tags' can be given unique IDs. Web Get will get all the text, then your code can find the ID of interest in that All-The-Text string.
<p id="HW">Hello World - what a lovely day!</p>
It's actually better to build simple web pages by hand - web page making programs actually produce over-complex code. You can learn the basics of HTML in a day: HTML Tutorial
Ok Thanks for the explanations and your interest.
Of course it would have been an excellent solution.
But for what I have to do, I think that if I can solve the visualization problems, using the text box seems to me the most appropriate. Thanks again everyone.