The scripts posted below were written by CHDK users, and are contributed '''as is'''.

−

=User-writtenScripts=

+

Pleasenote that prior to 2009 a number of special builds of CHDK were in general release and some used different uBASIC commands and features. With the unification of CHDK into one release trunk, some of these older scripts may not run on current versions of CHDK.

−

Dearscriptauthorsandthosejustlearning:

+

Also,beawarethatsomeofthese scripts use CHDK's ability to simulate camera button presses. As the buttons on any camera model typically vary from what is found on other camera models, the button press sequence scripted needs to be verified as correct for your camera.

−

The[http://chdk.setepontos.com/index.php'''CHDKForum''']hasadedicated [http://chdk.setepontos.com/index.php/board,7.0.html '''Script Writing and uBASIC''']section. Theforum'sdesignandcapabilitiesmakeitfareasiertodiscussandhelpwiththesometimesconfusingnatureofscriptsanduBASIC.Youarestronglyencouragedtopostonthatforumsothatyoucangetassistancemorerapidlyandinamuchmoreeasy-to-followdiscussionformat. I hope you can join us there!

For beginners, there is a tutorial: [http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad TutorialScratchpad]

−

−

Final scripts will still be added here as the main Scripts Archive. The above mentioned forum is only for those who would like some assistance or input from others with similar goals in mind.

−

−

{{tagb|→}} See also the '''[[CHDK_Scripting_Cross_Reference_Page|Scripting Cross Reference Page]]''' for the complete list of CHDK scripting commands for Lua and uBasic.

−

−

----

−

−

−

The scripts that are posted below were written by CHDK users, and are contributed '''as is'''.

−

−

Please note: since late summer of 2007 a number of special builds of CHDK have been developed with additional uBASIC commands and features. Thus, some of the scripts contributed recently may not run on all versions of CHDK.

−

−

Further, some of the recent scripts use the '''set_prop''' command. This directly modifies particular memory locations that store some camera settings. The '''Digic II''' and '''Digic III''' cameras apparently have different property number assignments. Currently (mid Nov, 2007) only the Digic II assignments have been determined an any detail. So, if you have a Digic III camera, be cautious in using any script that uses these commands.

* [[uBASIC/Scripts: HDRtimelapse|HDRtimelapse]](Starts at 300 as default for pictures. Easier to understand in some respects than the Ultra Intervalometer.Someone needs to find a waytocombine the 1st and 2nd scripts' user features as the 1st script doesn't show what's going on, rather just shoots. The second script tells you delay for 10 seconds so at least you know you're still taking a shot)

* [[uBASIC/Scripts:Long Exposure Intervalometer|Long Exposure Intervalometer]] (Its purpose is for NIGHT shots. Takes long exposure shots continuously for applications such as night time time-lapse or to take image stacking shots for astrophotography. IMPORTANT NOTE ABOUT THIS SCRIPT. IT TAKES LONG EXPOSURES, SO DON'T PANIC WHEN YOUR SCREEN GOES BLANK FOR 15 SECONDS. IT'S TAKING A PICTURE.)

* [[uBASIC/Scripts:Time Bandit 1.0|Time Bandit 1.0 -- Arman Bohn]] This timelapse script creates a sequence of jpegs which can be turned into an a video on your PC.

+

* [[uBASIC/Scripts: Scripts for Canon A640|Scripts for Canon A640]]

+

+

===Lua Script Libraries===

+

* [http://chdk.setepontos.com/index.php?topic=6149.0 Utilities #1]

+

* [http://chdk.setepontos.com/index.php?topic=9382.0 Sardanian Knife]

=== Other Resources / Archives ===

=== Other Resources / Archives ===

+

* [http://chdk.setepontos.com/index.php CHDK Forum] [http://chdk.setepontos.com/index.php/board,7.0.html &gt; Script Writing] [http://chdk.setepontos.com/index.php/board,12.0.html &gt; Completed and Working Scripts]: Some more scripts that may not appear here at the Wikia archive. Due to the easier method of jointly discussing and working on scripts at the CHDK Forum some new scripts are showing up there that you may not find in any other places. For example: some newer and faster Lightning Photography /Motion Detection scripts have been added (among others).

* [http://crteknologies.fr/wiki/doku.php/photo:chdk-scripts CHDK scriptsfor Canon SD1000/IXUS70]: An interesting collection of unique scripts, writtenprimarilyforthe SD1000/IXUS70 camera (DIGIC III), but can easily be converted to most all DIGIC II cameras by following the directions in the simple REM comments in them. Worth checking them out. Theyusesomecreativeshortcuts that can be applied to your own scripts, or used as-is.

−

::Some more scripts that may not appear here at the Wikia archive. Due to the easier method of jointly discussing and working on scripts at the CHDK Forum some new scripts are showing up there that you may not find in any other places. For example: some newer and faster Lightning Photography /Motion Detection scripts have been added (among others).

+

----

+

==Suggestions for contributors==

+

'''Dear script authors and those just learning:''' the [http://chdk.setepontos.com/index.php '''CHDK Forum'''] has a dedicated [http://chdk.setepontos.com/index.php/board,7.0.html '''Script Writing and uBASIC'''] section. The forum's design and capabilities make it far easier to discuss and help with the sometimes confusing nature of scripts and uBASIC. You are strongly encouraged to post on that forum so that you can get assistance more rapidly and in a much more easy-to-follow discussion format. I hope you can join us there!

{{tagb|→}} <span style="font-size:13px;line-height:21px;">For beginners, there isatutorial: </span>[http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpadTutorialScratchpad]. <spanstyle="font-size:13px;line-height:21px;">Seealsothe </span>'''[[CHDK_Scripting_Cross_Reference_Page|ScriptingCross Reference Page]]'''<span style="font-size:13px;line-height:21px;"> for the complete list of CHDK scripting commands for Lua and uBasic as well as many links to other scriptingreferencepages.</span>

::An interesting collection of unique scripts, written primarily for the SD1000/IXUS70 camera (DIGIC III), but can easily be converted to most all DIGIC II cameras by following the directions in the simple REM comments in them. Worth checking them out. They use some creative shortcuts that can be applied to your own scripts, or used as-is.

−

−

−

−

----

−

−

==Information for contributors==

−

Please add your debugged and tested scripts to this section. Reserve discussion and help for writing your script to the [http://chdk.setepontos.com/index.php/board,7.0.html <u>CHDK Forum: Script Writing</u>] (or the now rarely-used{{tpl|<u>discussion</u>}} section (tab above)). Final scripts will appear on this page.

:Since some scripts require special instructions that might be too lengthy to write into the script itself with "print" statements, I think it would be a good idea to start a common practice of including a short but informative text-file with each script, that could be saved by the same filename.Using a .TXT extension so the file may be referred to as a help-file using CHDK's "File Reader".

+

:Since some scripts require special instructions that might be too lengthy to write into the script itself with "print" statements, it is a good practice to include a short but informative text-file with each script, that could be saved by the same filename but using a .TXT extension so the file may be referred to as a help-file using CHDK's "File Reader".

:It has been found that some people are irresponsibly/foolishly sharing collections of scripts without the important accompanying documentation for each script. Try to include some extra info in the header of your script in the form of '''rem''' statements that might help the unfortunate people that might get hold of undocumented scripts. Beginning of script example:

:It has been found that some people are irresponsibly/foolishly sharing collections of scripts without the important accompanying documentation for each script. Try to include some extra info in the header of your script in the form of '''rem''' statements that might help the unfortunate people that might get hold of undocumented scripts. Beginning of script example:

Line 106:

Line 117:

</pre>

</pre>

−

'''Topost your own script to this mainScripts page:'''

+

'''Suggestionson posting your own script to your scripts page:'''

# Click on the [http://chdk.wikia.com/index.php?title=uBASIC/Scripts&action=edit EDIT '''TAB'''] at the top of the page (not the ones beside each entry).

# Click on the [http://chdk.wikia.com/index.php?title=uBASIC/Scripts&action=edit EDIT '''TAB'''] at the top of the page (not the ones beside each entry).

# Scroll to the bottom of the list of scripts.

# Scroll to the bottom of the list of scripts.

Latest revision as of 23:46, June 24, 2015

Contents

The scripts posted below were written by CHDK users, and are contributed as is.

Please note that prior to 2009 a number of special builds of CHDK were in general release and some used different uBASIC commands and features. With the unification of CHDK into one release trunk, some of these older scripts may not run on current versions of CHDK.

Also, be aware that some of these scripts use CHDK's ability to simulate camera button presses. As the buttons on any camera model typically vary from what is found on other camera models, the button press sequence scripted needs to be verified as correct for your camera.

Finally, some of these scripts use the get_prop and set_prop commands. These directly read or write particular memory locations that store some camera settings. Different cameras generations have different property number assignments, so be careful when using any script with these commands. Use the get_propset command to be sure which parameter set to use for a particular camera.

CHDK Forum> Script Writing> Completed and Working Scripts: Some more scripts that may not appear here at the Wikia archive. Due to the easier method of jointly discussing and working on scripts at the CHDK Forum some new scripts are showing up there that you may not find in any other places. For example: some newer and faster Lightning Photography /Motion Detection scripts have been added (among others).

CHDK scripts for Canon SD1000/IXUS70: An interesting collection of unique scripts, written primarily for the SD1000/IXUS70 camera (DIGIC III), but can easily be converted to most all DIGIC II cameras by following the directions in the simple REM comments in them. Worth checking them out. They use some creative shortcuts that can be applied to your own scripts, or used as-is.

Dear script authors and those just learning: the CHDK Forum has a dedicated Script Writing and uBASIC section. The forum's design and capabilities make it far easier to discuss and help with the sometimes confusing nature of scripts and uBASIC. You are strongly encouraged to post on that forum so that you can get assistance more rapidly and in a much more easy-to-follow discussion format. I hope you can join us there!

Please feel free to link your debugged and tested scripts to this wiki page. Reserve discussion and help for writing your script to the CHDK Forum: Script Writing .

Script pages linked here should include:

Camera model that you wrote it on.

Other camera models that it is known to work on.

The CHDK build required to run it (if it's an extension beyond GrAnds builds).

Any special instructions that may be required for running the script.

Your script!

Since some scripts require special instructions that might be too lengthy to write into the script itself with "print" statements, it is a good practice to include a short but informative text-file with each script, that could be saved by the same filename but using a .TXT extension so the file may be referred to as a help-file using CHDK's "File Reader".

It has been found that some people are irresponsibly/foolishly sharing collections of scripts without the important accompanying documentation for each script. Try to include some extra info in the header of your script in the form of rem statements that might help the unfortunate people that might get hold of undocumented scripts. Beginning of script example: