setting the camera mode - Script Writing - CHDK Forum  

setting the camera mode

  • 5 Replies
  • 1941 Views
setting the camera mode
« on: 27 / January / 2011, 09:23:05 »
Advertisements
Hi all,

Is it possible to set the camera mode?  For example, if your dial is currently set to Tv and you want to be Av when running a script, can your script automatically set the mode?


Thanks,

Walter

*

Offline reyalp

  • ******
  • 11919
Re: setting the camera mode
« Reply #1 on: 27 / January / 2011, 12:24:00 »
Yes. See http://chdk.wikia.com/wiki/Script_commands#set_capture_mode.28modenum.29

If using lua, you are encouraged to use capmode.lua so you can refer to them by name. E.g.
capmode=require("capmode")
capmode.set("AV")
Don't forget what the H stands for.

Re: setting the camera mode
« Reply #2 on: 27 / January / 2011, 12:55:25 »
Thanks, I am working on implementing that into my script.

I am seeing a playsound command.  I want to alert the operator that the camera cannot save pictures because the battery is low or there is no space.  I think I might be able to find that on that page too.


Walter

Re: setting the camera mode
« Reply #3 on: 27 / January / 2011, 12:56:16 »
Another question I have off-hand is how do you comment your scripts?

Walter


*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: setting the camera mode
« Reply #4 on: 27 / January / 2011, 14:15:53 »
Another question I have off-hand is how do you comment your scripts?
Do you want to know how comment looks in uBasic / LUA ?

LUA:
Code: (lua) [Select]
-- I'm a useless comment ;-)
print("Hello World")
-- more comment spam

uBASIC:
Code: [Select]
rem I'm a useless comment ;-)
print "Hello World"
rem more comment spam

You can find more examples in CHDK/SCRIPTS folder or wiki.
« Last Edit: 27 / January / 2011, 14:17:31 by pixeldoc2000 »

Re: setting the camera mode
« Reply #5 on: 28 / January / 2011, 18:19:58 »
How can I switch between photo and video mode on IXUS75?
Sorry for my English.

 

Related Topics