Cam´s Editor - General Discussion and Assistance - CHDK Forum

Cam´s Editor

  • 6 Replies
  • 4341 Views
*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Cam´s Editor
« on: 22 / April / 2020, 15:16:10 »
Advertisements
 :xmas Just a bit nicyfied again, easier to use then to explain...

   added  // Caefix 22/4/2020 :...,....1....,....2....,....3....,....4..
   ~~ [MemWatch], some 'collectgarbage() ' to fix bigfile|longline Bug
   ~~   <MENU> in WRITE goes to special chars or inserts string from textbox()

Edit: Latest !Edi.Lua at Reply #4...
« Last Edit: 16 / May / 2020, 10:32:54 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: Cam´s Editor
« Reply #1 on: 25 / April / 2020, 13:02:36 »
Now !edi.lua knows to append edits elsewhere & :-* it has an exit_alt()...

The line "   file=file_browser(PATH) or DFAULT  " behaves unexpected on cam, if 1st. press=<menu>.
Edit: That´s interesting only, because You don´t want to edit e.g. "A/CHDK/".
Fixed in r5493
The first run in HostLuaPortable should print...

Code: [Select]
=== CHDK LUA local ====================
 Run Script: !EDI.lua
=======================================

Process started >>>
---------------------------------------
title: !EDI - text editor
@chdk_version: 1.4.0.0
param n Newline  (0=Windows 1=Unix)
@default n 0
param y Editor height
@default y 14
param x Editor width
@default x 42
param s Start Browser in
@default s 0
param f insert function map
@default f 0
param a Write a new file?   (1=Yes)
@default a 0
param b Do backups?          (0=No)
@default b 1
param i Create A/Z/.../ab.c
@default i 0
param m Low Memory          (1=Yes)
@default m 0
param e fix execute()       (1=Yes)
@default e 1
param z Has this camera zoom?(0=NO)
@default z 1
conf = D:\hostluaPortable\bin\local_conf.lua
=== START =============================
>play mode<
yes 386
LUA 386
and 386
break 387
do 387
else 387
elseif 387
end 387
false 387
for 388
function 388
if 388
in 388
local 388
nil 389
not 389
or 389
repeat 389
return 389
then 389
true 390
until 390
while 390
assert 390
collectgarbage 390
...
set_focus 405
set_focus_interlock_bypass 405
set_iso_mode 401
set_iso_real 401
set_lcd_display 402
set_led 402
set_levent_active 402
set_levent_script_mode 402
set_mf 398
set_movie_status 398
set_nd_filter 399
set_prop 399
set_prop_str 399
set_raw 399
set_raw_develop 399
set_raw_nr 396
set_record 396
set_remote_timing 397
set_sv96 397
set_tv96 397
set_tv96_direct 397
set_usb_capture_timeout 394
set_user_av96 395
set_user_av_by_id 395
set_user_av_by_id_rel 395
set_user_tv96 395
set_user_tv_by_id 395
set_user_tv_by_id_rel 390
set_yield 390
set_zoom 390
set_zoom_rel 391
set_zoom_speed 391
shoot 391
shot_histo_enable 391
shot_histo_write_to_file 388
shut_down 388
sleep 388
sv96_market_to_real 388
sv96_real_to_market 389
sv96_to_iso 389
swap_partitions 373
switch_mode_usb 373
textbox 373
tv96_to_usec 374
usb_force_active 374
usb_msg_table_to_string 351
usb_sync_wait 351
usec_to_tv96 351
wait_click 351
wheel_left 351
wheel_right 351
write_usb_msg 352
hook_preshoot.continue 352
hook_preshoot.count 352
hook_preshoot.is_ready 352
hook_preshoot.set 353
hook_raw.continue 353
hook_raw.count 353
hook_raw.is_ready 353
hook_raw.set 353
hook_shoot.continue 354
hook_shoot.count 337
hook_shoot.is_ready 337
hook_shoot.set 337
rawop.create_histogram 337
rawop.ev_to_raw 338
rawop.fill_rect 267
rawop.get_active_height 267
rawop.get_active_left 267
rawop.get_active_top 268
rawop.get_active_width 268
rawop.get_bits_per_pixel 268
rawop.get_black_level 268
rawop.get_cfa 268
rawop.get_cfa_offsets 269
rawop.get_jpeg_height 269
rawop.get_jpeg_left 269
rawop.get_jpeg_top 269
rawop.get_jpeg_width 269
rawop.get_pixel 270
rawop.get_pixels_rgbg 270
rawop.get_raw_height 270
rawop.get_raw_neutral 270
rawop.get_raw_width 270
rawop.get_white_level 271
rawop.meter 271
rawop.raw_to_ev 271
rawop.set_pixel 271
rawop.set_pixels_rgbg 272
Clouds.txt 251
Cumulus 252
Cumulus_humilis 252
Cumulus_mediocris 252
Cumulus_fractus 252
Cirro-cumulus_castellatus 252
Cumulus_congestus 253
Cumulonimbus 253
Cumulonimbus_calvus 253
Cumulonimbus_capillatus_pileus 253
Cumulonimbus_capillatus_incus 254
Alto-cumulus 254
Alto-cumulus_cumulogenitus 254
Alto-cumulus_lenticularis 254
Alto-cumulus_floccus 254
Alto-cumulus_stratiformis_perlucidus 255
Alto-cumulus_stratiformis_translucidus 255
Alto-cumulus_stratiformis_radiatus 255
Alto-cumulus_stratiformis_undulatus 255
Cirro-cumulus 256
Cirro-cumulus_floccus 256
Cirro-cumulus_floccus_lacunosus 256
Cirro-cumulus_lenticularis_duplicatus 256
Cirro-cumulus_stratiformis_undulatus 257
Cirro-cumulus_contrailgenitus 257
Cirrus 257
Cirrus_floccus 257
Cirrus_fibratus 257
Cirrus_fibratus_intortus 258
Cirrus_fibratus_radiatus 258
Cirrus_fibratus_vertebratus 258
Cirrus_uncinus 258
Cirro-stratus 259
Cirro-stratus_fibratus 259
Cirro-stratus_nebulosus 259
Halo 259
Rainbow 259
Alto-stratus 260
Alto-stratus_translucidus 260
Alto-stratus_opacus 260
Nimbo-stratus 260
Okklusion 260
Nimbo-stratus_mammatus 261
Arcus 261
Tuba 261
Velum 261
Virgae 261
Pannus 262
Praecipitatio 262
Strato-cumulus 262
Strato-cumulus_stratiformis 262
Strato-cumulus_stratiformis_undulatus 263
Strato-cumulus_stratiformis_opacus_praecipitatus 263
Cirrus_spissatus 263
Stratus_nebulosus 263
Stratus_fractus 263
Duplicatus 264
Ogenitus 264
>change console layout< 0 0 42 14
>redraw console< 0
>Startup dir:< A/CHDK/SCRIPTS A/CHDK/LOGS/log_1000.tXt
& create tree A/Z/.../...
« Last Edit: 16 / May / 2020, 11:32:25 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: Cam´s Editor
« Reply #2 on: 28 / April / 2020, 13:37:46 »
 :xmas Appended ready for cam script, strongly recommended for cams without <"display">.

Added:
++      EXP_COUNT & "other" function map to Insert menu.
++      Insert file @cursorposition  :-*
++      More inserts, line ends without "\r" (but CR get´s saved as set).
++      use textbox as oneline clipboard :)
++      "A/Z/[.../]vocabulary.tree.I" ~~ line 470  :lol
« Last Edit: 16 / May / 2020, 10:26:06 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: Cam´s Editor
« Reply #3 on: 04 / May / 2020, 13:25:02 »
:xmas Just a bit nicyfied again, easier to use then to explain...
Now !Edi.Lua comes with a keyword index in filesystem.
Could be expanded to an encycomedy...

--If  You need to <escape> file_browser() !! (empty file A/Z/!.I does that, too.)
If no file is chosen with <set>, <menu> breaks script. :o  I think, file_browser() should return with nil.
 Edits gone to digital nirvana...
Fixed in r5493 :xmas
On some cams is an issue with short file names or surprising upcasing.
On (e.g.?) Ixus870 You can´t create the filetree, (Edit: Break after 64 lines), but it can be copied to sd´s root.
Edit2: S90 & Ix200,300 mix sfn & lfn, Break after ~220 lines (all 3 same line).

Edit: It´an Option to do that on cam, You can run -- HostLuaPortable Makro <local> instead.
&& Always needs included Keywords.Lua & Clouds.txt in /A/CHDK/BOOKS
...
« Last Edit: 16 / May / 2020, 11:06:32 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: Cam´s Editor
« Reply #4 on: 06 / May / 2020, 14:03:12 »
There  :haha is a funny workflow possible:
Run !Edi.Lua with <Keywords.Lua> LIST to get an empty_file TREE
Code: [Select]
...
I:\Z\get\get_zoom.L
I:\Z\get\get_zoom_steps.L
I:\Z\get\getfenv.L
I:\Z\get\getmetatable.L
I:\Z\p\package.loaded.L
I:\Z\p\pairs.L
I:\Z\p\pcall.L
I:\Z\p\peek.L
I:\Z\p\play_sound.L
I:\Z\p\poke.L
I:\Z\p\post_levent_for_npt.L
I:\Z\p\post_levent_to_ui.L
I:\Z\p\press.L
I:\Z\p\print.L
I:\Z\p\print_screen.L
I:\Z\s\save_config_file.L
I:\Z\s\seconds_to_tv96.L
I:\Z\s\select.L
...
now You can edit file, use file_browser() as a clipboard to insert <print_screen> @cursorpostion
if there is an ".I" instead of ".L", then the filecontent is placed there.
This could be enhanced to a ascii chdk wiki for cam, a project manual or a botanic´s diary...

Nice to exit text using the exit_alt() line, take photos, return to text, thumbdance some notes,
save & so on...

Inspiration included...

Edit: Some features are limited on older cams because of...
https://chdk.setepontos.com/index.php?topic=12680.msg143456#msg143456
« Last Edit: 16 / May / 2020, 12:35:18 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: Cam´s Editor
« Reply #5 on: 22 / March / 2022, 16:35:08 »
Code: [Select]
@title CharChck.bas
@subtitle --- °äöüß ÄÖܵ ---
 ?"@=",asc"@",asc("@",1),asc("@",-1),asc("@",2),asc("@",0),len("@")
 ?"°=",asc"°",asc("°",1),asc("°",-1),asc("°",2),asc("°",0),len("°")
 ?"@=",instr(4,"@abc@def@ghi","@"),,len("@")
 ?"°=",instr(4,"°abc°def°ghi","°"),,len("°")
Quote
@= 64 64 64 0 0 1  :-[
°= 194 194 176 176 0 2
@= 5, 1
°= 6, 2  :blink:
The special chars are logged like written, but displayed different in GUI, console, Editor, prefixed with Ascii 194=  or 195=A~. Length & position seem out of focus, too...
« Last Edit: 26 / March / 2022, 17:06:53 by Caefix »
All lifetime is a loan from eternity.

*

Offline December172

  • *
  • 34
  • A student interested in the Canon P&S hack
Re: Cam´s Editor
« Reply #6 on: 09 / November / 2022, 01:11:39 »
See my reply here 8).
now You can edit file, use file_browser() as a clipboard to insert <print_screen> @cursorpostion
if there is an ".I" instead of ".L", then the filecontent is placed there.
This could be enhanced to a ascii chdk wiki for cam, a project manual or a botanic´s diary...

Nice to exit text using the exit_alt() line, take photos, return to text, thumbdance some notes,
save & so on...
IMO,this is *merge* files,not a real clipboard.A read clipboard can cut and copy text and place or replace to other text,even not in one file.But this is a idea to make a auto completion editor(like a IDE),maybe there's a better solution.
Canon PowerShot ELPH 180 (IXUS 175).
(Seems most of you are older than me.... Anyone teen? )

 

Related Topics


SimplePortal © 2008-2014, SimplePortal