CHDK Wiki
Register
(Full Command Syntax Manual?)
(CHDK uBASIC DOS/Windows Emulator?)
Line 32: Line 32:
   
 
Post it, don't post it? What say you?
 
Post it, don't post it? What say you?
  +
  +
== CHDK uBASIC DOS/Windows Emulator? ==
  +
  +
Is there any way that a uBASIC emulator can be available for DOS or Windows where we could write our scripts on the computer, and test them BEFORE putting them on the SD card for the camera?
  +
  +
I found I was taking up more time copying the scripts to my SD card, rebooting the camera, going to the menu, testing it, noting the error, going back to the computer ... rinse & repeat infinauseum.
  +
  +
Surely there must be an easier way than this.

Revision as of 02:07, 26 April 2007

Since this might be new territory for the average camera owner, writing their own little programs to automate their cameras, it would be a good idea to discuss any concerns, hints, tips, and further information you might have on the subject.

Here are some concerns that come to mind:

I wasn't too sure about uBasic syntax and how variables are defined (integer, floating-point, etc.). I found a uBasic package online that included a lengthy doc file in it, but we are working with a very small subset of all available commands for uBasic. Which commands will work? Which will not?

There is also the discrepancy between camera makes and models that CHDK will work on. I have found that some menu items are not identical between the A-series and Sx SI series of cameras. Scripts will have to be modified at times when using special features of each camera. And some type of standard notation in shared-scripts to alert others to which camera(s) the script was written for.

It would be nice if there was an easy place for all of us to share our tweaked or brand-new scripts. I recently wrote one that allows for a greatly extended use of Focus-Bracketing for a Powershot S3 IS camera, but it requires special instructions for use that are too lengthy to include in the script itself. I am also unsure if this script would work on other makes and models of cameras. How would one go about sharing that script and required documentation?


We could include new scripts in this wiki as new pages. Perhaps we could make a link here like "more scripts" or "user scripts" or something like that. And on that new page, we could place our scripts as subpages.

Harvester

Added in a "User Written Scripts" section. PLEASE advise if I'm doing this all wrong! Or if it should be done some other way. I'm new to this Wikia thingy.

~Keo~


Full Command Syntax Manual?

When hunting online for more uBASIC info I ran across a file inside of a ubasic.zip archive. (Don't ask me where I found that now, it took about an hour's search before I found something more extensive than what was already posted here.)

The included Word DOC was titled "UBASIC86 Version 7.23 - for IBM-PC - User's Manual"

I saved it in a text file for further reference. This is a much more extensive list of commands than what is available in CHDK's uBASIC. Would it be a good idea to post that text file as a new sub-page for this scripting section, in the hopes that someone would go through and glean out the unimplemented commands? Just the info on how variables are defined alone was helpful. As well as now knowing that using goto and gosub are equally valid to call up a label routine.

It was recently reported, for example, that the "print" command in CHDK is limited to a line length of 24 characters. Little things like that would be important to know for the know-nothing script writer, like myself.

Post it, don't post it? What say you?

CHDK uBASIC DOS/Windows Emulator?

Is there any way that a uBASIC emulator can be available for DOS or Windows where we could write our scripts on the computer, and test them BEFORE putting them on the SD card for the camera?

I found I was taking up more time copying the scripts to my SD card, rebooting the camera, going to the menu, testing it, noting the error, going back to the computer ... rinse & repeat infinauseum.

Surely there must be an easier way than this.