CHDK Scripting Cross Reference Page - Script Writing - CHDK Forum supplierdeeply

CHDK Scripting Cross Reference Page

  • 16 Replies
  • 9274 Views
CHDK Scripting Cross Reference Page
« on: 13 / May / 2012, 12:12:48 »
Advertisements
There's a new scripting page on the wiki today.

CHDK Scripting Cross Reference Page

It was generated by dumping all the Lua and uBASIC scripting functions in the source code,  massaging the information in a spreadsheet and finding links to every function, converting that spreadsheet to wikimedia table format and creating a new page. 

In the process,   there were a number of undocumented functions found (mostly related to the recent pseudo-merge of CHDK and CHDK-DE).   Stubs for those were added at the bottom of Script_commands. If you have a moment,  completing those would be a big help.

Please feel free to fix mistakes and bloopers.  However,  be aware that Wiki tables are very touchy. 

Also, I still have the original spreadsheet but the online conversion function I used ( http://excel2wiki.net/wikipedia.php ) strips formatting so I had to edit it back in by hand.  Not sure the best way to maintain this going forward.  Maybe just normal wiki editing will be enough ? Or perhaps a  CSV version of the speadsheet stored in the svn trunk (reyalp's suggestion) but then I'll have to write my own converter that keeps the formatting the way you see it.   Always another project over the horizon.
« Last Edit: 13 / May / 2012, 15:31:14 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: CHDK Scripting Cross Reference Page
« Reply #1 on: 13 / May / 2012, 15:15:13 »
This is better than I was imagine :) I hope I'll find some free time to add some info. Regards!
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: CHDK Scripting Cross Reference Page
« Reply #2 on: 13 / May / 2012, 15:22:23 »
I hope I'll find some free time to add some info.
The page actually captures every scripting function.  I was thinking it best if we to keep the description field to one short line for scrolling convenience.  So the best place to add more info would be in the linked descriptions.  Some of them are just stubs and others are less than eight words long.  Code samples posted there would be even better.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1255
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK Scripting Cross Reference Page
« Reply #3 on: 13 / May / 2012, 15:25:51 »
Great work! Thank you.

I started with some brief descriptions of focus functions comes from CHDK-DE.

msl
CHDK-DE:  CHDK-DE links


Re: CHDK Scripting Cross Reference Page
« Reply #4 on: 13 / May / 2012, 15:32:11 »
Great work! Thank you.

I started with some brief descriptions of focus functions comes from CHDK-DE.

msl
Thanks msl.   These ones will all need work
1.49 get_curve_file
1.50 set_curve_file
1.51 get_curve_state
1.52 set_curve_state
1.53 get_focus_mode
1.54 get_focus_state
1.55 get_focus_ok
1.56 get_focal_length
1.57 get_min_stack_dist
1.58 set_file_attributes
1.59 get_partitionInfo
1.60 swap_partition
1.61 get_buildinfo
1.62 get_dofinfo
1.63 get_video_details
1.64 textbox
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1255
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK Scripting Cross Reference Page
« Reply #5 on: 13 / May / 2012, 15:54:44 »
Ok, I'll see.

In our German manual we have also a tabular overview of (probably) all script functions. You can download the manual as pdf file: http://forum.chdk-treff.de/viewtopic.php?f=13&t=486 (see attachment)

Search for 'Skriptbefehle für uBasic' and  'Lua-Befehle' in pdf file. Maybe this helps a little bit.

msl
CHDK-DE:  CHDK-DE links

Re: CHDK Scripting Cross Reference Page
« Reply #6 on: 13 / May / 2012, 17:19:42 »
In our German manual we have also a tabular overview of (probably) all script functions.
Even though I don't speak or read German,  that looks like a really nice manual.  There has obviously been a lot of work and "tender loving care" put into it.   Too bad its not easy to automatically translate - it would be a nice "advanced" manual that would augment the existing CHDK English manuals.

Having said that,  I think the wiki page approach has a couple of advantages.   First of all, each function listed is linked to the part of the wiki where there is a more complete definition and maybe even code snippets.  Secondly,  its fairly easy to scroll through the function list looking for a particular function if you don't remember its name.  And finally,  it can be updated on an ongoing basis - ensuring that you don't accidentally spend time looking through an out-of-date pdf file.

Maybe having both would be nice :)




Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1255
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: CHDK Scripting Cross Reference Page
« Reply #7 on: 14 / May / 2012, 06:22:56 »
I have added some descriptions.

The description of the textbox should be a task for the textbox developers.

get_video_details() - that's a thing for reyalp.

msl

CHDK-DE:  CHDK-DE links


*

Offline reyalp

  • ******
  • 11752
Re: CHDK Scripting Cross Reference Page
« Reply #8 on: 17 / May / 2012, 02:11:44 »
get_video_details() - that's a thing for reyalp.
It's something from the old ptp liveview code, it will go away.
Don't forget what the H stands for.

Re: CHDK Scripting Cross Reference Page
« Reply #9 on: 18 / May / 2012, 01:16:31 »
Thank you!  I'm just starting my first original (I think) script and bogged down over a problem with get_tv.  Now I know & can move on.  I'll post it, of course, when I have something useable.  Thanks to all who have worked on developing and documenting CHDK!
S3 IS with LensMate filter/hood adapter

 

Related Topics