2006-10-14, 17:50
Hi everybody !
I made a very simple script to open files for reading and editing.
I know alexpoet already developped a 'notepad' script, but as for myself, I didn't like it so much... Maybe I need to test it again... Maybe it is better than what I remember...
Anyway, I was thinking of an editor 'line by line' for many month and decided to code it now.
It opens text files line by line and put the lines inside a controlList control. As some lines can be longer than what a list item can show on your screen, a value is used as parameter to split long lines.
I think it can be usefull for editing xml files or input user informations to set some scripts without the need to edit it on PC and FTPing on Xbox.
Anyway, hard for me to explain, so the best thing is that you guys test it and tell me what you think.
Do you like it ?
Will you use it ?
What does it need to be more usefull
...
Download : http://xbmc-scripts.gx-mod.com/documents...141006.rar
Bugs :
- For french at least, "accent" leters (à é è ...) are replaced with squares as editing it... It must be because of text encoding, but didn't figure out how to solve it yet
- Empty files make the script hangs
Need more test :
ANSI files just work fine, but need to improve script for other encodings (utf8, unicode, ...)
Running :
1- launch the script
-> a default text file is open (it is a french one and explain the commands)
2- white pad button : open/close a menu (open / save)
3- open button : open the xbmc file browser to select your file
3bis- save button : save the current text and make an "on place" copy of the original file with .old extension
4- B red pad button : on a line ask to delete the selected line
5- Y yellow pad button : on a line, insert a new line on this position
6- A green pad button : on a line, open virtual keyboard for editing the line
7- ask for saving when you quit if text has been modified
8- ask for saving if you mdified the text AND if you choose to open a new file
You should get a message box for the first run, simply because it uses a .ini file for settings, and I decided that this file should be in Q:\userdata directory. So the script will tell you file is missing , then, will copy the one at root of script directory, inside userdata dir. Hope it makes sense
I made a very simple script to open files for reading and editing.
I know alexpoet already developped a 'notepad' script, but as for myself, I didn't like it so much... Maybe I need to test it again... Maybe it is better than what I remember...
Anyway, I was thinking of an editor 'line by line' for many month and decided to code it now.
It opens text files line by line and put the lines inside a controlList control. As some lines can be longer than what a list item can show on your screen, a value is used as parameter to split long lines.
I think it can be usefull for editing xml files or input user informations to set some scripts without the need to edit it on PC and FTPing on Xbox.
Anyway, hard for me to explain, so the best thing is that you guys test it and tell me what you think.
Do you like it ?
Will you use it ?
What does it need to be more usefull
...
Download : http://xbmc-scripts.gx-mod.com/documents...141006.rar
Bugs :
- For french at least, "accent" leters (à é è ...) are replaced with squares as editing it... It must be because of text encoding, but didn't figure out how to solve it yet
- Empty files make the script hangs
Need more test :
ANSI files just work fine, but need to improve script for other encodings (utf8, unicode, ...)
Running :
1- launch the script
-> a default text file is open (it is a french one and explain the commands)
2- white pad button : open/close a menu (open / save)
3- open button : open the xbmc file browser to select your file
3bis- save button : save the current text and make an "on place" copy of the original file with .old extension
4- B red pad button : on a line ask to delete the selected line
5- Y yellow pad button : on a line, insert a new line on this position
6- A green pad button : on a line, open virtual keyboard for editing the line
7- ask for saving when you quit if text has been modified
8- ask for saving if you mdified the text AND if you choose to open a new file
You should get a message box for the first run, simply because it uses a .ini file for settings, and I decided that this file should be in Q:\userdata directory. So the script will tell you file is missing , then, will copy the one at root of script directory, inside userdata dir. Hope it makes sense