2016년 12월 29일 목요일

Edit text file with MIT App inventor 2?


I'm noob with MIT App inventor 2, i need to download and edit a text file, so i found how to download a file but now i need to edit this file, remove some text and add some text (many and many text it's a big file).
So you can help me to do this ?

--
Simplest way would be to completely overwrite the file with new content. 
Also, consider using other storage components such as TinyDB.

-- 
I tried to do something with TinyDB but i don't find how i can do this.
i already created my app for windows, i use Autohotkey to make my app, i use function "String replace" to replace some texts and now i want to create a android version of my app.
So i think i need to use something like "String replace" to replace some texts in my file, we can find something like this in MIT App inventor ?

My windows app works like this :
-> Download the file from internet
-> Save the file in my HDD (named file1.txt)
-> Read file1.txt 
-> Replace some texts
-> Save the new file with the new texts in my HDD (named file2.txt)

So i need to do same thing with MIT App inventor.

You can help me please ?

-- 
use the file component to read the file and the text blocks to manipulate the text


A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling.

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of AppInventor, then try something and follow the
 Top 5 Tips: How to learn App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

-- 

-- 


댓글 없음:

댓글 쓰기