Text Editor - Edi2 - page 3 - Script Writing - CHDK Forum
supplierdeeply

Text Editor - Edi2

  • 31 Replies
  • 8904 Views
Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #20 on: 03 / October / 2011, 20:23:17 »
Advertisements
When I downloaded the EDITOR_2_3_1.zip it did not have the file "filebrws.lua" with it. Is this available somewhere? thanks.

Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #21 on: 03 / October / 2011, 22:03:02 »
When I downloaded the EDITOR_2_3_1.zip it did not have the file "filebrws.lua" with it. Is this available somewhere? thanks.
You don't need that file with the latest version of the editor - its integrated into the editor.  However,  I've attached it here you are if you want it for some other reason.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #22 on: 04 / October / 2011, 01:50:14 »
The newest versions of EDI doesn't need separately filebrws.lua file anymore, since it's merged with an EDI.LUA file. Unless you like to use filebrws.lua without edi.lua.

//Holy holy... I didn't understand what waterwingz has written...
« Last Edit: 04 / October / 2011, 07:18:25 by outslider »
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #23 on: 09 / October / 2011, 16:25:28 »
And the newest version is released. It uses file_browser() function, so you need CHDK not older than changeset 1359 (more best - 1360). The newest Edi - 2.4 is in first post.

Thanks for reyalp and philmoz;)
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick


*

Offline msl

  • *****
  • 1269
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #24 on: 12 / October / 2011, 06:30:23 »
Hi Pawel,

really nice work - respect.

Some notes: The exit() function should be renamed in restore(), because this function will also called automatically when a user will ending the script with shutter. The settings for a default console are set_console_layout(0,0,25,5). Perhaps the script needs some improvement when it uses an empty file. I get some errors when I try edit an empty file.

For a future version it would be nice we can also include special language chars. But this is more a cosmetic thing.

msl
CHDK-DE:  CHDK-DE links

Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #25 on: 12 / October / 2011, 08:36:15 »
The restore() function is great idea, I haven't know that!

About set_console_layout() - I tried a few settings and only these, which I used in editor gave me the same layout as before running the editor. I'm not sure why it's not 25,5.

About an empty file - I know that and I'm currently working on it. I'm going to add a possibility to create a new file in selected localization with user-given name.

About special chars - I have no idea how to add them. You can add a chars by ASCII but I don't know, how to use UTF8 which is needed here. Also - how to set an encoding.

Thank you for a feedback!
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #26 on: 13 / October / 2011, 17:27:04 »
Here's a new version, however it's a testing version, not next release. That's why is posted here, not in the first post.

Changelog:
- 'new file' option added; at the moment you can only select a file name from lists.
- empty file opening fixed (however an empty file can't be saved, always contain \n at least...)
- some changes in menu() function - it looks a little bit different

New file creation has to be invoked as a parameter for the script. Just set apropriate value to 1. The file is not really created on SD card at script startup, it's physically created when you use 'save' function (as in PC editors). Then you have to select file's destination directory, file's name (from a short list only) and the extension.

Currently there is no possibility to write the file name letter by letter. I'm going to change the edi_write() function to be usefull not only for an file editing, but writing at all. But I have no time for it now...

I can see, the code grows up and I'll need to rewrite some parts. Uhh...

« Last Edit: 13 / October / 2011, 17:30:31 by outslider »
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #27 on: 24 / January / 2012, 17:08:50 »
Ha! New experimental version of the EDI!

EDI 2.6 uses textbox() function which is currently aviable in experimental branch. Because of that 'new file' and 'Save as...' options can not be used in other branches (stable 1.0 and reyalp-flt as well). If 'new file' or 'Save as...' option is used in these branches an error occurs!

While none of above functions is used, EDI 2.6 should work (althought it was not tested).

Changelog for 2.x series:
    - 'new file' enhanced
    - empty file opening fixed (however really empty file can't be saved, it'll contain \n at least...)
    - usage of text_box() for 'save as...' and new file name (thx for TobiMarg, tsvstar, philmoz, msl and others)
    - fixed bug while browser is closed
    - erase in MOVE mode jumps to the begin of the file
    -others little changes
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick


Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #28 on: 08 / August / 2012, 06:51:19 »
New stable version released! 2.7 which is almost like 2.6 but few small changes added. Version considered to be stable and posted for being added to the official CHDK releasess.

File will be attached on the first post in following few minutes.
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

*

Offline msl

  • *****
  • 1269
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Text Editor - Edi2 - FINAL RELEASE!
« Reply #29 on: 09 / September / 2012, 05:32:21 »
Hi,

cameras without a DISP button like the S100 need some changes in the script code. You could define exceptions via get_buildinfo().

Code: (lua) [Select]
bi = get_buildinfo()
if bi.platform = "s100" then
    INSERT_MENU_BUTTON="video"
    KEYS_TABLE={"left","up","right","down","set","shoot_half","shoot_full","menu","video","erase","zoom_in","zoom_out"}
end
Maybe it's also time for a new script function get_camerainfo() which contains a keymap, LCD dimensions a.s.o.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics