is there a master list of commands for script writers? - Script Writing - CHDK Forum

is there a master list of commands for script writers?

  • 9 Replies
  • 9219 Views
is there a master list of commands for script writers?
« on: 20 / March / 2009, 22:11:39 »
Advertisements
Hello, I've been messing around with CDHK for about a week now, and I really enjoy this software and all the scripts people have been contributing.

I would like to write a few scripts of my own, but I am a little lost.  I am familiar with BASIC (basic stamp and picaxe microcontrollers)  but there are a lot of CDHK specific commands that come up, and I have no idea how to use them.

Is there a master list of all the commands that can be used in these scripts, what cameras those commands are compatible with, how long a script can be, how many variables can I use? etc.

some of the commands are fairly obvious, like:  @title, @default, @param,  md_detect_motion, set_raw_nr,  set_raw,  set_iso,  set_tv96_direct,  shoot, etc.

but it would be really helpful to have a list of all the variables available in the standard CDHK build.
I have been looking around on this forum for the past few days, and haven't been able to find anything.

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: is there a master list of commands for script writers?
« Reply #1 on: 21 / March / 2009, 07:38:27 »
Hi headless_rabbit,

you'll find the needed informations for uBasic in the CHDK wikia:
  http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad
  http://chdk.wikia.com/wiki/UBASIC/uBASIC_syntax

Besides uBasic there's another, more powerful scripting language available in CHDK: Lua
  http://chdk.wikia.com/wiki/LUA
  http://chdk.wikia.com/wiki/LUA/LUA_syntax
  http://chdk.wikia.com/wiki/LUA/LUA_Reference
 
Also have a look (for both, uBasic and Lua) to the list of new scripting commands:
  http://chdk.wikia.com/wiki/CHDK/MoreBest#New_uBASIC_and_LUA_Scripting_Commands.21

*

Offline reyalp

  • ******
  • 14126
Re: is there a master list of commands for script writers?
« Reply #2 on: 21 / March / 2009, 17:44:28 »
Of course, the most accurate list is found in the source ;)
Don't forget what the H stands for.

Re: is there a master list of commands for script writers?
« Reply #3 on: 26 / May / 2009, 20:24:29 »
Of course, the most accurate list is found in the source ;)

Speaking of which, is there a single point of access + directions for downloading source and compiling it?  I prefer linux environment, slackware, if it matters, 'cos I haven't done windoze app development for a decade.

Also, is there an emulator for running scripts?  Or is that idea totally silly due to the range of supported cameras all being the same only different?

*

Offline reyalp

  • ******
  • 14126
Re: is there a master list of commands for script writers?
« Reply #4 on: 27 / May / 2009, 01:38:08 »
Of course, the most accurate list is found in the source ;)

Speaking of which, is there a single point of access + directions for downloading source and compiling it?  I prefer linux environment, slackware, if it matters, 'cos I haven't done windoze app development for a decade.
http://chdk.wikia.com/wiki/For_Developers

Note that rolling your own tool chain has some quirk, be sure you read the relevant pages/threads.
Quote
Also, is there an emulator for running scripts?  Or is that idea totally silly due to the range of supported cameras all being the same only different?
I started a lua based script emulator, mentioned in this thread http://chdk.setepontos.com/index.php/topic,2929.0.html but haven't had time to work on it recently. Just having a syntax check with the CHDK functions dummied on the PC helps a lot.
Don't forget what the H stands for.

*

Offline zeno

  • *****
  • 891
Re: is there a master list of commands for script writers?
« Reply #5 on: 27 / May / 2009, 11:34:45 »
The SDM ubasic debugger (http://www.zenoshrdlu.com/kapstuff/zsdmubdb.html) and CHDK ubasic debugger (http://www.zenoshrdlu.com/kapstuff/zubdb.html) are reasonably up-to-date in terms of supported ubasic functions.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: is there a master list of commands for script writers?
« Reply #6 on: 27 / May / 2009, 12:28:17 »
The SDM ubasic debugger (http://www.zenoshrdlu.com/kapstuff/zsdmubdb.html)


SDM has many, powerful uBasic commands that are not in the basic version of CHDK.

See descriptions here.


David

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: is there a master list of commands for script writers?
« Reply #7 on: 27 / May / 2009, 12:37:24 »
there are also lots of chdk-ubasic commands that are not in sdm. oh, and lets not forget lua.

Re: is there a master list of commands for script writers?
« Reply #8 on: 07 / April / 2010, 20:18:17 »
I'm just getting into Lua, and I've noticed some common uBasic commands don't seem to work.

ex. uBasic: set_iso 3
Lua: tried set_iso(3), but my camera's saying that's not available.  Other setting changes appear to also be unavailable in lua, unless there's something I'm not doing correctly (forgetting to include a lib?)

*

Offline reyalp

  • ******
  • 14126
Re: is there a master list of commands for script writers?
« Reply #9 on: 07 / April / 2010, 23:25:52 »
I'm just getting into Lua, and I've noticed some common uBasic commands don't seem to work.

ex. uBasic: set_iso 3
Lua: tried set_iso(3), but my camera's saying that's not available.  Other setting changes appear to also be unavailable in lua, unless there's something I'm not doing correctly (forgetting to include a lib?)
set_iso_mode is does the same thing, in both ubasic and lua.

Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal